/*
 Navicat Premium Data Transfer

 Source Server         : 101.37.169.10
 Source Server Type    : MySQL
 Source Server Version : 50739
 Source Host           : 101.37.169.10:3306
 Source Schema         : pdmaas

 Target Server Type    : MySQL
 Target Server Version : 50739
 File Encoding         : 65001

 Date: 11/11/2022 14:54:35
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for core_code_generator
-- ----------------------------
DROP TABLE IF EXISTS `core_code_generator`;
CREATE TABLE `core_code_generator`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `GENERATOR_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '生成器ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '生成器类型',
  `CONTENT_` json NULL COMMENT '生成器内容',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成器' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_data_type
-- ----------------------------
DROP TABLE IF EXISTS `core_data_type`;
CREATE TABLE `core_data_type`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `DATA_TYPE_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据类型ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型代码',
  `DEF_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型名称',
  `TYPE_MAPPING` json NULL COMMENT '类型映射内容;类型与数据库，代码生成器之间的依赖',
  `OFFICIAL_LOCK` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否为官方锁定;官方类型，官方更新后，可以联动官方更正',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据类型' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_db_conn
-- ----------------------------
DROP TABLE IF EXISTS `core_db_conn`;
CREATE TABLE `core_db_conn`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `CONN_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '连接ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '连接代码',
  `DEF_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '连接名称',
  `DB_TYPE_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据库连接类型',
  `PROPERTIES` json NULL COMMENT '连接属性',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据库连接' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_db_type
-- ----------------------------
DROP TABLE IF EXISTS `core_db_type`;
CREATE TABLE `core_db_type`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `DB_TYPE_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据库模板ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据库代码',
  `DDL_TEMPLATE` json NULL COMMENT '常规模板',
  `VERSION_DDL_TEMPLATE` json NULL COMMENT '版本模板',
  `OFFICIAL_LOCK` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否为官方锁定;官方类型，官方更新后，可以联动官方更正',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据库模板' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_diagram
-- ----------------------------
DROP TABLE IF EXISTS `core_diagram`;
CREATE TABLE `core_diagram`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `DIAGRAM_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '关系图ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实体代码',
  `DEF_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实体名称',
  `CANVAS_DATA` json NULL COMMENT '画布数据',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '关系图' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_dict
-- ----------------------------
DROP TABLE IF EXISTS `core_dict`;
CREATE TABLE `core_dict`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `DICT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典代码',
  `DEF_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典名称',
  `INTRO` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典说明',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据字典' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_dict_item
-- ----------------------------
DROP TABLE IF EXISTS `core_dict_item`;
CREATE TABLE `core_dict_item`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `DICT_ITEM_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典项ID',
  `DICT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典项代码',
  `DEF_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典项名称',
  `INTRO` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典项说明',
  `PARENT_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父字典项代码',
  `ENABLED_` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否启用',
  `SORT_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '排序顺序号',
  `ATTR1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '扩展属性1',
  `ATTR2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '扩展属性2',
  `ATTR3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '扩展属性3',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据字典项' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_domain
-- ----------------------------
DROP TABLE IF EXISTS `core_domain`;
CREATE TABLE `core_domain`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `DOMAIN_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据域ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DATA_TYPE_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据类型ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据域代码',
  `DEF_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据域代码名称',
  `LEN_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '长度',
  `SCALE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '小数位',
  `UI_HINT` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'UI建议',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据域' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_entity
-- ----------------------------
DROP TABLE IF EXISTS `core_entity`;
CREATE TABLE `core_entity`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `ENTITY_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '实体ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实体代码',
  `DEF_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实体名称',
  `ENTITY_TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实体类型',
  `COMMENT_` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实体注释',
  `PROPERTIES` json NULL COMMENT '扩展属性',
  `CORRELATIONS` json NULL COMMENT '关联对象',
  `REF_ENTITIES` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '引用实体ID',
  `HEADERS` json NULL COMMENT '实体表头展示设置',
  `ENV` json NULL COMMENT '环境信息',
  `SORT_NO` int(11) NULL DEFAULT NULL COMMENT '排序',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  `NOTES` json NULL COMMENT '批注',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '实体/视图' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_entity_field
-- ----------------------------
DROP TABLE IF EXISTS `core_entity_field`;
CREATE TABLE `core_entity_field`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `FIELD_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字段ID',
  `ENTITY_SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '实体流水号ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字段代码',
  `DEF_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字段名称',
  `COMMENT_` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字段注释',
  `DATA_TYPE_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据类型ID',
  `LEN_` int(11) NULL DEFAULT NULL COMMENT '长度',
  `SCALE_` int(11) NULL DEFAULT NULL COMMENT '小数位数',
  `PRIMARY_KEY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否主键',
  `NOT_NULL` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否允许为空',
  `AUTO_INCREMENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否自增',
  `DEFAULT_VALUE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '默认值',
  `HIDE_IN_GRAPH` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关系图隐藏',
  `REF_DICT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '引用数据字典',
  `DOMAIN_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '使用的数据域',
  `UI_HINT` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'UI建议设置',
  `REF_ENTITY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '引用实体',
  `REF_ENTITY_FIELD` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '引用实体字段',
  `SORT_NO` int(11) NULL DEFAULT NULL COMMENT '排序',
  `PROPERTIES` json NULL COMMENT '扩展属性',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  `NOTES` json NULL COMMENT '批注',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '实体字段' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_entity_index
-- ----------------------------
DROP TABLE IF EXISTS `core_entity_index`;
CREATE TABLE `core_entity_index`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `INDEX_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '索引ID',
  `ENTITY_SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '实体流水号ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '索引代码',
  `DEF_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '索引名称',
  `COMMENT_` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '索引注释',
  `UNIQUE_` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否唯一',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '实体索引' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_entity_index_field
-- ----------------------------
DROP TABLE IF EXISTS `core_entity_index_field`;
CREATE TABLE `core_entity_index_field`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `INDEX_FIELD_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '索引字段ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `INDEX_SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '索引流水ID',
  `FIELD_DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '引用字段',
  `ASC_OR_DESC` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '排序方式',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '实体索引字段' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_project
-- ----------------------------
DROP TABLE IF EXISTS `core_project`;
CREATE TABLE `core_project`  (
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `PROJECT_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目名',
  `PROJECT_INTRO` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目说明',
  `CATALOG_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所在目录',
  `TOTAL_ENTITIES` int(11) NULL DEFAULT NULL COMMENT '实体/视图数量',
  `TOTAL_DICTS` int(11) NULL DEFAULT NULL COMMENT '数据字典数量',
  `TOTAL_DIAGRAMS` int(11) NULL DEFAULT NULL COMMENT '关系图数量',
  `AVATAR` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '项目头像',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `TENANT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属公司ID',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  `PROJECT_STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目状态',
  `DEL_USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目删除者ID',
  PRIMARY KEY (`PROJECT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for core_project_profile
-- ----------------------------
DROP TABLE IF EXISTS `core_project_profile`;
CREATE TABLE `core_project_profile`  (
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `ENTITY_INIT_FIELDS` json NULL COMMENT '新建表默认字段',
  `ENTITY_INIT_PROPERTIES` json NULL COMMENT '新建表默认属性',
  `DEFAULT_DB_TYPE_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '默认数据库类型',
  `UI_HINTS` json NULL COMMENT 'UI建议选项',
  `DATA_TYPE_SUPPORTS` json NULL COMMENT '数据类型映射',
  `CODE_TEMPLATES` json NULL COMMENT '代码模板',
  `DOC_TEMPLATE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'WORD文档模板',
  `RELATION_FIELD_SIZE` int(11) NULL DEFAULT NULL COMMENT '关系最大字段数',
  `ENTITY_NAME_TEMPLATE` json NULL COMMENT '实体名称模板',
  `ENTITY_HEADERS` json NULL COMMENT '实体表头展示设置',
  `SQL_DELIMITER` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT ';' COMMENT 'sql分隔符;',
  `EXT_PROPS` json NULL COMMENT '新增字段默认扩展属性;',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  `MODEL_TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '模式类型',
  `RECENT_COLORS` json NULL COMMENT '颜色',
  PRIMARY KEY (`PROJECT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目设置' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for core_project_user_hist
-- ----------------------------
DROP TABLE IF EXISTS `core_project_user_hist`;
CREATE TABLE `core_project_user_hist`  (
  `HIST_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '历史记录ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `HISTORY_CONTENT` json NULL COMMENT '历史版本全量内容',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户更改历史' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for core_project_version
-- ----------------------------
DROP TABLE IF EXISTS `core_project_version`;
CREATE TABLE `core_project_version`  (
  `VERSION_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '历史记录ID',
  `VERSION_CODE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '版本代码',
  `VERSION_COMMENT` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '版本说明',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `HISTORY_CONTENT` json NULL COMMENT '历史版本全量内容',
  `DIFF_CONTENT` json NULL COMMENT '相对上一版本差异内容',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`VERSION_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目版本' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for core_referen_catalog
-- ----------------------------
DROP TABLE IF EXISTS `core_referen_catalog`;
CREATE TABLE `core_referen_catalog`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `CATALOG_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类代码',
  `DEF_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类名称',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字段库分类' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_referen_field
-- ----------------------------
DROP TABLE IF EXISTS `core_referen_field`;
CREATE TABLE `core_referen_field`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `REFEREN_FIELD_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '模板库字段ID',
  `CATALOG_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字段代码',
  `DEF_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字段名称',
  `COMMENT_` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字段注释',
  `DATA_TYPE_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据类型ID',
  `LEN_` int(11) NULL DEFAULT NULL COMMENT '长度',
  `SCALE_` int(11) NULL DEFAULT NULL COMMENT '小数位数',
  `PRIMARY_KEY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否主键',
  `NOT_NULL` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否允许为空',
  `AUTO_INCREMENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否自增',
  `DEFAULT_VALUE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '默认值',
  `HIDE_IN_GRAPH` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关系图隐藏',
  `REF_DICT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '引用数据字典',
  `DOMAIN_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '使用的数据域',
  `UI_HINT` json NULL COMMENT 'UI建议设置',
  `PROPERTIES` json NULL COMMENT '扩展属性',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  `NOTES` json NULL COMMENT '批注',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '模板库字段' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for core_topic
-- ----------------------------
DROP TABLE IF EXISTS `core_topic`;
CREATE TABLE `core_topic`  (
  `SERIAL_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `TOPIC_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '话题ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `DEF_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '话题代码',
  `DEF_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '话题名称',
  `REF_ENTITIES` json NULL COMMENT '包含的实体',
  `REF_VIEWS` json NULL COMMENT '包含的视图',
  `REF_DIAGRAMS` json NULL COMMENT '包含的关系图',
  `REF_DICTS` json NULL COMMENT '包含的字典',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`SERIAL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '分类主题' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for fswk_dict
-- ----------------------------
DROP TABLE IF EXISTS `fswk_dict`;
CREATE TABLE `fswk_dict`  (
  `KEY_` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典标识号',
  `LABEL` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典名称',
  `I18N` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '国际化标识',
  `INTRO` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典介绍',
  `TENANTID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户号',
  `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for fswk_dict_item
-- ----------------------------
DROP TABLE IF EXISTS `fswk_dict_item`;
CREATE TABLE `fswk_dict_item`  (
  `DICT_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典标识号',
  `KEY_` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典项标识号',
  `LABEL` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典项名称',
  `VALUE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '值',
  `STATUS_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态',
  `LABEL_PINYIN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典项名称拼音',
  `SORT` int(11) NULL DEFAULT NULL COMMENT '字典介绍',
  `HOTSPOT` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '热度',
  `CORRELATION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联数据',
  `INTRO` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `TENANTID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户号',
  `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for maas_auth_permission
-- ----------------------------
DROP TABLE IF EXISTS `maas_auth_permission`;
CREATE TABLE `maas_auth_permission`  (
  `AUTH_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `URL` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '路径',
  `ROLE_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色类型',
  `ACCESS_RIGHT` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '访问权限',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`AUTH_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '权限' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for maas_catalog
-- ----------------------------
DROP TABLE IF EXISTS `maas_catalog`;
CREATE TABLE `maas_catalog`  (
  `CATALOG_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '目录ID',
  `PARENT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父目录ID',
  `OWNER_USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '归属用户',
  `SORT_NUMBER` int(11) NULL DEFAULT NULL COMMENT '排序号',
  `CATALOG_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '目录名',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  `TENANT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属公司ID',
  PRIMARY KEY (`CATALOG_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '分类目录' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for maas_client_registe_info
-- ----------------------------
DROP TABLE IF EXISTS `maas_client_registe_info`;
CREATE TABLE `maas_client_registe_info`  (
  `GENERATE_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `LICENSE` varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `TENANT_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 85 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for maas_coproc
-- ----------------------------
DROP TABLE IF EXISTS `maas_coproc`;
CREATE TABLE `maas_coproc`  (
  `CORPOC_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '协同记录ID',
  `USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `ROLE_TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '协同角色',
  `INVITE_USER_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邀请人用户ID;',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`CORPOC_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '协同处理' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for maas_db_conn
-- ----------------------------
DROP TABLE IF EXISTS `maas_db_conn`;
CREATE TABLE `maas_db_conn`  (
  `CONN_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据库ID',
  `DRIVER_CLASS_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '驱动',
  `URL` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'url',
  `USER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据库账户名',
  `PASSWORD` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据库密码',
  `DEF_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '连接名称',
  `DB_TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据库连接类型',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  `TENANT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司Id',
  PRIMARY KEY (`CONN_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据库连接' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for maas_download
-- ----------------------------
DROP TABLE IF EXISTS `maas_download`;
CREATE TABLE `maas_download`  (
  `DOWNLOAD_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '下载ID',
  `USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID',
  `OBJECT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '收载对象类型',
  `OBJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '对象ID',
  `INTRO` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '收藏说明',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`DOWNLOAD_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '下载' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for maas_favor
-- ----------------------------
DROP TABLE IF EXISTS `maas_favor`;
CREATE TABLE `maas_favor`  (
  `FAVOR_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '收载ID',
  `USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID',
  `OBJECT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '收载对象类型',
  `OBJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '对象ID',
  `INTRO` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '收藏说明',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`FAVOR_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '收藏' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for maas_issue
-- ----------------------------
DROP TABLE IF EXISTS `maas_issue`;
CREATE TABLE `maas_issue`  (
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `PROJECT_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目名',
  `PROJECT_INTRO` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目说明',
  `PROJECT_INDUSTRY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目行业类型',
  `PROJECT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目上架类型',
  `PAY_AMOUNT` decimal(24, 6) NULL DEFAULT NULL COMMENT '付费金额',
  `THUMBNAIL` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '缩略图',
  `STARS` decimal(24, 6) NULL DEFAULT NULL COMMENT '评分星级',
  `ISSUE_STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上架状态',
  `CATALOG_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所在目录',
  `USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发布用户',
  `TENANT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发布企业',
  `OFF_USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '下架用户',
  `OFF_TENANT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '下架企业',
  `VISIT_COUNT` int(11) NULL DEFAULT NULL COMMENT '查看次数',
  `FAVOR_COUNT` int(11) NULL DEFAULT NULL COMMENT '收藏次数',
  `COPY_COUNT` int(11) NULL DEFAULT NULL COMMENT '获取次数',
  `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  `IS_TOP` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否置顶',
  PRIMARY KEY (`PROJECT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目广场' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for maas_issue_rating
-- ----------------------------
DROP TABLE IF EXISTS `maas_issue_rating`;
CREATE TABLE `maas_issue_rating`  (
  `RATING_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '评分ID',
  `PROJECT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目ID',
  `USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '评分用户',
  `STARS` decimal(24, 6) NULL DEFAULT NULL COMMENT '评分星级',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`RATING_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户评分' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for maas_order
-- ----------------------------
DROP TABLE IF EXISTS `maas_order`;
CREATE TABLE `maas_order`  (
  `ORDER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单ID',
  `USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID',
  `TENANT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司ID',
  `CREATE_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交易时间',
  `TRANS_AMT` decimal(24, 6) NULL DEFAULT NULL COMMENT '交易金额',
  `TRANS_CONTENT` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交易内容',
  `ORDER_YEARS` int(11) NULL DEFAULT NULL COMMENT '订单时间',
  `ORDER_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单类型',
  `CUBICLE_IDS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '席位情况',
  `CUBICLE_NUM` int(11) NULL DEFAULT NULL COMMENT '席位数量',
  `PAY_CHANNEL` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '支付方式',
  `INVOICE_STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '开票状态',
  `TRANS_STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交易状态',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`ORDER_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for maas_oss
-- ----------------------------
DROP TABLE IF EXISTS `maas_oss`;
CREATE TABLE `maas_oss`  (
  `FILE_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件ID',
  `FILE_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名',
  `FILE_PATH` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件路径',
  `FILE_SIZE` int(11) NULL DEFAULT NULL COMMENT '文件大小',
  `FILE_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件类型',
  `STORE_TYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '存储类型',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`FILE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '对象存储记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for maas_price_system
-- ----------------------------
DROP TABLE IF EXISTS `maas_price_system`;
CREATE TABLE `maas_price_system`  (
  `PRICE_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流水号',
  `TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
  `AMOUNT` decimal(24, 6) NULL DEFAULT NULL COMMENT '单价',
  `DISCOUNT` decimal(24, 6) NULL DEFAULT NULL COMMENT '折扣',
  `YEARS` int(11) NULL DEFAULT NULL COMMENT '服务时限',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`PRICE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '定价系统' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for maas_registe_info
-- ----------------------------
DROP TABLE IF EXISTS `maas_registe_info`;
CREATE TABLE `maas_registe_info`  (
  `TALNENT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `LICENSE` varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `GENERATE_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `TALNENT_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`TALNENT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for maas_tenant
-- ----------------------------
DROP TABLE IF EXISTS `maas_tenant`;
CREATE TABLE `maas_tenant`  (
  `TENANT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公司ID',
  `TENANT_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司名',
  `COMPANY_INDUSTRY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司行业类型',
  `COMPANY_PHONE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司联系电话',
  `COMPANY_DISTRICT` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司所在区域',
  `COMPANY_ADDRESS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司地址',
  `AVATAR` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '公司LOGO',
  `TENANT_RANK` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业级别',
  `TOTAL_SEAT` int(11) NULL DEFAULT 1 COMMENT '购买的席位数',
  `EXPIRE_DATE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '到期日',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  `USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业所有者',
  `AU_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业认证类型',
  `STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审批状态',
  PRIMARY KEY (`TENANT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '租户企业' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for maas_tenant_role
-- ----------------------------
DROP TABLE IF EXISTS `maas_tenant_role`;
CREATE TABLE `maas_tenant_role`  (
  `TENANT_ROLE_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '企业角色id',
  `TENANT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公司ID',
  `ROLE_TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色类型',
  `USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`TENANT_ROLE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '企业角色' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for maas_user
-- ----------------------------
DROP TABLE IF EXISTS `maas_user`;
CREATE TABLE `maas_user`  (
  `USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID',
  `USER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
  `PASSWORD` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
  `NICK_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称',
  `REAL_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名',
  `MOBILE_PHONE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号',
  `MOBILE_PHONE_BIND` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号绑定',
  `WECHAT_OPEN_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信号',
  `WECHAT_BIND` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信号绑定',
  `EMAIL` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮件地址',
  `EMAIL_BIND` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮件绑定',
  `GITEE_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'GITEE账号',
  `GITEE_BIND` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'GITEE绑定',
  `AVATAR` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像',
  `USER_RANK` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户等级',
  `STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户状态',
  `TENANT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属公司ID',
  `TENANT_NAME` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属公司名',
  `COMPANY_INDUSTRY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司行业类型',
  `USER_WORK_AS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户职位',
  `INTRO` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户介绍',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`USER_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for maas_user_log
-- ----------------------------
DROP TABLE IF EXISTS `maas_user_log`;
CREATE TABLE `maas_user_log`  (
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户日志' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for mass_cubicle
-- ----------------------------
DROP TABLE IF EXISTS `mass_cubicle`;
CREATE TABLE `mass_cubicle`  (
  `CUBICLE_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '席位ID',
  `TENANT_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公司ID',
  `START_DATE` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '开始日期',
  `EXPIRE_DATE` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '结束日期',
  `CUBICLE_STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '席位状态',
  `OWNER_USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '席位用户',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  `LICENSE_CODE` varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '席位的license',
  PRIMARY KEY (`CUBICLE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '席位' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for mass_order_item
-- ----------------------------
DROP TABLE IF EXISTS `mass_order_item`;
CREATE TABLE `mass_order_item`  (
  `ORDER_ITEM` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单明细ID',
  `ORDER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单ID',
  `CUBICLE_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '席位ID',
  `ITEM_AMT` decimal(24, 6) NULL DEFAULT NULL COMMENT '明细金额',
  `ITEM_CONTENT` varchar(900) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '明细内容',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`ORDER_ITEM`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订购席位明细' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for mass_recent_invite
-- ----------------------------
DROP TABLE IF EXISTS `mass_recent_invite`;
CREATE TABLE `mass_recent_invite`  (
  `RECENT_INVITE_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '记录流水号',
  `USER_ID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID',
  `INVITE_USER_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '被邀请用户ID',
  `REVISION` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乐观锁',
  `CREATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATED_BY` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '最近邀请的用户' ROW_FORMAT = DYNAMIC;

SET FOREIGN_KEY_CHECKS = 1;
-- ----------------------------
-- 以下部分为初始化数据部分
-- ----------------------------

-- ------------------------------------------------------------------------------------
-- 下述为默认登录，可修改root为您中意的登录用户名，其余信息可不做修改，后续可通过页面进行修改
-- ------------------------------------------------------------------------------------

INSERT INTO `maas_user`(USER_ID,USER_NAME,PASSWORD,NICK_NAME,STATUS,TENANT_ID,TENANT_NAME,CREATED_TIME) VALUES ("10","root","C7F66BEEE198FB411C8623E53CBBC6EB1E0F078B5D68ED7F10D02FFB0AF46D44","超级管理员","Normal","10","默认企业",NOW());

INSERT INTO `maas_tenant`(TENANT_ID,TENANT_NAME,AU_TYPE,STATUS,USER_ID) VALUES ("10","默认企业","O","S","10");

INSERT INTO `maas_tenant_role`(TENANT_ROLE_ID,TENANT_ID,ROLE_TYPE,USER_ID) VALUES("10","10","SYSTEMADMIN","10");

INSERT INTO `core_project`(PROJECT_ID,PROJECT_NAME,PROJECT_INTRO,CATALOG_ID,TOTAL_ENTITIES,TOTAL_DICTS,TOTAL_DIAGRAMS,REVISION,TENANT_ID,PROJECT_STATUS) VALUES("10","empty","empty","0","0","6","0","1","10","EMPTY");

INSERT INTO `core_project_profile`(`PROJECT_ID`, `ENTITY_INIT_FIELDS`, `ENTITY_INIT_PROPERTIES`, `DEFAULT_DB_TYPE_ID`, `UI_HINTS`, `DATA_TYPE_SUPPORTS`, `CODE_TEMPLATES`, `DOC_TEMPLATE`, `RELATION_FIELD_SIZE`, `ENTITY_NAME_TEMPLATE`, `ENTITY_HEADERS`, `SQL_DELIMITER`, `EXT_PROPS`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `MODEL_TYPE`, `RECENT_COLORS`) VALUES ('10', '[{\"id\": \"ADB3AD14-6603-43E2-8261-114E32442B5B\", \"len\": 32, \"scale\": null, \"defKey\": \"TENANT_ID\", \"domain\": \"16120F75-6AA7-4483-868D-F07F511BB081\", \"uiHint\": \"\", \"comment\": \"\", \"defName\": \"租户号\", \"notNull\": false, \"refDict\": \"\", \"dataType\": null, \"extProps\": null, \"dbDataType\": null, \"primaryKey\": false, \"hideInGraph\": true, \"defaultValue\": \"\", \"autoIncrement\": false}, {\"id\": \"92BF430E-01FA-4AEF-944F-25A142632654\", \"len\": 32, \"scale\": null, \"defKey\": \"REVISION\", \"domain\": \"16120F75-6AA7-4483-868D-F07F511BB081\", \"uiHint\": \"\", \"comment\": \"\", \"defName\": \"乐观锁\", \"notNull\": false, \"refDict\": \"\", \"dataType\": null, \"extProps\": null, \"dbDataType\": null, \"primaryKey\": false, \"hideInGraph\": true, \"defaultValue\": \"\", \"autoIncrement\": false}, {\"id\": \"C8BE2C7A-8251-4ADD-BB4F-411C5754DA62\", \"len\": 32, \"scale\": null, \"defKey\": \"CREATED_BY\", \"domain\": \"16120F75-6AA7-4483-868D-F07F511BB081\", \"uiHint\": \"\", \"comment\": \"\", \"defName\": \"创建人\", \"notNull\": false, \"refDict\": \"\", \"dataType\": null, \"extProps\": null, \"dbDataType\": null, \"primaryKey\": false, \"hideInGraph\": true, \"defaultValue\": \"\", \"autoIncrement\": false}, {\"id\": \"4E471FD6-3E73-4A90-B660-51598A482409\", \"len\": null, \"scale\": null, \"defKey\": \"CREATED_TIME\", \"domain\": \"7CFFA0D3-6A93-4DDC-BC10-DF21211064DC\", \"uiHint\": \"\", \"comment\": \"\", \"defName\": \"创建时间\", \"notNull\": false, \"refDict\": \"\", \"dataType\": null, \"extProps\": null, \"dbDataType\": null, \"primaryKey\": false, \"hideInGraph\": true, \"defaultValue\": \"\", \"autoIncrement\": false}, {\"id\": \"0DC24AA9-4CD0-45D8-95CF-FA546BE343AB\", \"len\": 32, \"scale\": null, \"defKey\": \"UPDATED_BY\", \"domain\": \"16120F75-6AA7-4483-868D-F07F511BB081\", \"uiHint\": \"\", \"comment\": \"\", \"defName\": \"更新人\", \"notNull\": false, \"refDict\": \"\", \"dataType\": null, \"extProps\": null, \"dbDataType\": null, \"primaryKey\": false, \"hideInGraph\": true, \"defaultValue\": \"\", \"autoIncrement\": false}, {\"id\": \"09F64AC4-4DEE-428F-AF64-4C103884E1AC\", \"len\": null, \"scale\": null, \"defKey\": \"UPDATED_TIME\", \"domain\": \"7CFFA0D3-6A93-4DDC-BC10-DF21211064DC\", \"uiHint\": \"\", \"comment\": \"\", \"defName\": \"更新时间\", \"notNull\": false, \"refDict\": \"\", \"dataType\": null, \"extProps\": null, \"dbDataType\": null, \"primaryKey\": false, \"hideInGraph\": true, \"defaultValue\": \"\", \"autoIncrement\": false}]', '{\"partitioned by\": \"(date string)\", \"store as textfile;\": \"\", \"row format delimited\": \"\", \"fields terminated by \',\'\": \"\", \"map keys terminated by \':\'\": \"\", \"collection items terminated by \'-\'\": \"\"}', '29D1CE08-4C35-4D2D-AAA9-23D93305B52E', '[{\"id\": \"642D2E0A-8846-4549-BE56-8C0473F26EDE\", \"defKey\": \"Input\", \"defName\": \"普通输入框\"}, {\"id\": \"FB111359-2B73-4443-926C-08A98E446448\", \"defKey\": \"Select\", \"defName\": \"下拉输入框\"}, {\"id\": \"0CB8A6C9-1115-4FC0-B51E-5C028065082F\", \"defKey\": \"CheckBox\", \"defName\": \"复选框\"}, {\"id\": \"5C04987A-260F-4B7C-A5D5-22A181AAE9CA\", \"defKey\": \"RadioBox\", \"defName\": \"单选框\"}, {\"id\": \"8D5BAFE4-E15C-4707-A047-8EE59C58E70F\", \"defKey\": \"Double\", \"defName\": \"小数输入\"}, {\"id\": \"9999AF2A-A44E-415C-A2DC-D7C613BD0073\", \"defKey\": \"Integer\", \"defName\": \"整数输入\"}, {\"id\": \"2B0C3D0C-7BAF-4B36-81AD-9362B5E5DC2E\", \"defKey\": \"Money\", \"defName\": \"金额输入\"}, {\"id\": \"E4D94E14-F695-487F-AFC2-4D888009B7DA\", \"defKey\": \"Date\", \"defName\": \"日期输入\"}, {\"id\": \"936927E3-DD2D-4096-87FD-074CDE278D59\", \"defKey\": \"DataYearMonth\", \"defName\": \"年月输入\"}, {\"id\": \"D89DD4F1-ADAC-4469-BF8D-B3FF41AE7963\", \"defKey\": \"Text\", \"defName\": \"长文本输入\"}, {\"id\": \"C134EB1F-4CFF-49E0-882F-2C6FB275CB20\", \"defKey\": \"RichText\", \"defName\": \"富文本输入\"}]', '[{\"id\": \"29D1CE08-4C35-4D2D-AAA9-23D93305B52E\", \"defKey\": \"MYSQL\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542\", \"defKey\": \"ORACLE\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"BFC87171-C74F-494A-B7C2-76B9C55FACC9\", \"defKey\": \"SQLServer\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022\", \"defKey\": \"PostgreSQL\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"89504F5D-94BF-4C9E-8B2E-44F37305FED5\", \"defKey\": \"DB2\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307\", \"defKey\": \"DM\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"592C7013-143D-4E7B-AF64-0D7BF1E28230\", \"defKey\": \"GaussDB\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"77BD85E5-9D0D-4096-8427-CBA306FC9C6A\", \"defKey\": \"Kingbase\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"11D1FB71-A587-4217-89BA-611B8A1F83E0\", \"defKey\": \"MaxCompute\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1\", \"defKey\": \"SQLite\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"797A1496-D649-4261-89B4-544132EC3F36\", \"defKey\": \"JAVA\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"895CFD1D-4273-4D32-A2C4-CAC70200AB5B\", \"defKey\": \"JavaMybatis\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"A2EE7B4A-CE62-4290-B00C-B26C1BF18073\", \"defKey\": \"JavaMybatisPlus\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30\", \"defKey\": \"C#\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2\", \"defKey\": \"Hive\", \"dbOrProgram\": \"DATABASE\"}, {\"id\": \"B91D99E0-9B7C-416C-8737-B760957DAF09\", \"defKey\": \"Golang\", \"dbOrProgram\": \"DATABASE\"}]', '[{\"type\": \"appCode\", \" JpaBean\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkDataType = \\\"String\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    \\n}}package {{=pkgName}}.entity;\\n$blankline\\nimport io.swagger.annotations.ApiModel;\\nimport io.swagger.annotations.ApiModelProperty;\\nimport javax.persistence.*;\\nimport java.io.Serializable;\\nimport java.util.Date;\\n$blankline\\n\\n /**\\n * {{=it.entity.defName}};{{=it.entity.comment}}\\n * @author : http://www.chiner.pro\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n */\\n@ApiModel(value = \\\"{{=it.entity.defName}}\\\",description = \\\"{{=it.entity.comment}}\\\")\\n@Table(name=\\\"{{=it.entity.defKey}}\\\")\\npublic class {{=beanClass}} implements Serializable,Cloneable{\\n{{~it.entity.fields:field:index}}\\n    /** {{=it.func.join(field.defName,field.comment,\';\')}} */\\n    {{? field.primaryKey }}\\n    @Id\\n    @GeneratedValue\\n    {{?}}\\n    @ApiModelProperty(name = \\\"{{=field.defName}}\\\",notes = \\\"{{=field.comment}}\\\")\\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\\n{{~}}\\n$blankline\\n\\n{{~it.entity.fields:field:index}}\\n    /** {{=it.func.join(field.defName,field.comment,\';\')}} */\\n    public {{=field.type}} get{{=it.func.camel(field.defKey,true)}}(){\\n        return this.{{=it.func.camel(field.defKey,false)}};\\n    }\\n    /** {{=it.func.join(field.defName,field.comment,\';\')}} */\\n    public void set{{=it.func.camel(field.defKey,true)}}({{=field.type}} {{= it.func.camel(field.defKey,false) }}){\\n        this.{{=it.func.camel(field.defKey,false)}}={{=it.func.camel(field.defKey,false)}};\\n    }\\n{{~}}\\n}\", \"applyFor\": \"797A1496-D649-4261-89B4-544132EC3F36\"}, {\"type\": \"appCode\", \"Default\": \"using System;\\nusing System.Collections.Generic;\\n\\n$blankline\\n{{\\n    var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n}}\\n/*\\n * @author : http://www.chiner.com.cn\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n * @desc : {{=it.func.join(it.entity.defName,it.entity.comment,\'-\')}}\\n */\\nnamespace PDManer.Application\\n{\\n    public partial class {{=it.func.camel(it.entity.defKey,true) }}\\n    {\\n    \\n        {{~it.entity.fields:field:index}}\\n        /// <summary>\\n        /// {{=it.func.join(field.defName,field.comment,\';\')}}\\n        /// </summary>\\n        public {{=field.type}} {{=it.func.camel(field.defKey,true)}} { get; set; }\\n        $blankline\\n        {{~}}\\n        \\n    }\\n}\", \"SqlSugar\": \"using System;\\nusing System.Collections.Generic;\\nusing SqlSugar;\\n\\n$blankline\\n{{\\n    var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    var sqlSugartable=\'[SugarTable(\\\"{{=it.entity.defKey}}\\\", TableDescription = \\\"{{=it.func.join(it.entity.defName,it.entity.comment,\';\')}}\\\")]\';\\n}}\\n/*\\n * @author : xkdong@163.com\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n * @desc : {{=it.func.join(it.entity.defName,it.entity.comment,\'-\')}}\\n */\\nnamespace Model.DBModel\\n{\\n    /// <summary>\\n    /// {{=it.func.join(it.entity.defName,it.entity.comment,\';\')}}\\n    /// </summary>\\n    {{=sqlSugartable}}\\n    public class {{=it.entity.defKey}}\\n    {\\n        {{~it.entity.fields:field:index}}\\n        /// <summary>\\n        /// {{=it.func.join(field.defName,field.comment,\';\')}}\\n        /// </summary>\\n        {{? field.primaryKey }}\\n        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]\\n        {{?}}\\n        public {{=field.type}} {{=it.func.camel(field.defKey,true)}}{ get; set; }\\n        $blankline\\n        {{~}}\\n    }\\n}\", \"applyFor\": \"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30\"}, {\"type\": \"appCode\", \"Entity\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkDataType = \\\"String\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    \\n}}package {{=pkgName}}.entity;\\n$blankline\\nimport io.swagger.annotations.ApiModel;\\nimport io.swagger.annotations.ApiModelProperty;\\nimport java.io.Serializable;\\nimport java.util.Date;\\n$blankline\\n\\n /**\\n * {{=it.entity.defName}};{{=it.entity.comment}}\\n * @author : http://www.chiner.pro\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n */\\n@ApiModel(value = \\\"{{=it.entity.defName}}\\\",description = \\\"{{=it.entity.comment}}\\\")\\npublic class {{=beanClass}} implements Serializable,Cloneable{\\n{{~it.entity.fields:field:index}}\\n    /** {{=it.func.join(field.defName,field.comment,\';\')}} */\\n    @ApiModelProperty(name = \\\"{{=field.defName}}\\\",notes = \\\"{{=field.comment}}\\\")\\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\\n{{~}}\\n$blankline\\n\\n{{~it.entity.fields:field:index}}\\n    /** {{=it.func.join(field.defName,field.comment,\';\')}} */\\n    public {{=field.type}} get{{=it.func.camel(field.defKey,true)}}(){\\n        return this.{{=it.func.camel(field.defKey,false)}};\\n    }\\n    /** {{=it.func.join(field.defName,field.comment,\';\')}} */\\n    public void set{{=it.func.camel(field.defKey,true)}}({{=field.type}} {{= it.func.camel(field.defKey,false) }}){\\n        this.{{=it.func.camel(field.defKey,false)}}={{=it.func.camel(field.defKey,false)}};\\n    }\\n{{~}}\\n}\", \"Mapper\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkDataType = \\\"String\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    \\n}}package {{=pkgName}}.mapper;\\n$blankline\\nimport java.util.List;\\nimport org.apache.ibatis.annotations.Mapper;\\nimport org.apache.ibatis.annotations.Param;\\nimport org.springframework.data.domain.Pageable;\\nimport {{=pkgName}}.entity.{{=beanClass}};\\n$blankline\\n\\n /**\\n * {{=it.entity.defName}};({{=it.entity.defKey}})表数据库访问层\\n * @author : http://www.chiner.pro\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n */\\n@Mapper\\npublic interface {{=beanClass}}Mapper{\\n    /** \\n     * 通过ID查询单条数据 \\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 实例对象\\n     */\\n    {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}});\\n    \\n    /** \\n     * 分页查询指定行数据\\n     *\\n     * @param {{=beanVarName}} 查询条件\\n     * @param pageable 分页对象\\n     * @return 对象列表\\n     */\\n    List<{{=beanClass}}> queryAllByLimit({{=beanClass}} {{=beanVarName}}, @Param(\\\"pageable\\\") Pageable pageable);\\n\\n    /** \\n     * 统计总行数\\n     *\\n     * @param {{=beanVarName}} 查询条件\\n     * @return 总行数\\n     */\\n    long count({{=beanClass}} {{=beanVarName}});\\n\\n    /** \\n     * 新增数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 影响行数\\n     */\\n    int insert({{=beanClass}} {{=beanVarName}});\\n\\n    /** \\n     * 批量新增数据\\n     *\\n     * @param entities List<{{=beanClass}}> 实例对象列表\\n     * @return 影响行数\\n     */\\n    int insertBatch(@Param(\\\"entities\\\") List<{{=beanClass}}> entities);\\n    \\n    /** \\n     * 批量新增或按主键更新数据\\n     *\\n     * @param entities List<{{=beanClass}}> 实例对象列表\\n     * @return 影响行数\\n     */\\n    int insertOrUpdateBatch(@Param(\\\"entities\\\") List<{{=beanClass}}> entities);\\n    \\n    /** \\n     * 更新数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 影响行数\\n     */\\n    int update({{=beanClass}} {{=beanVarName}});\\n\\n    /** \\n     * 通过主键删除数据\\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 影响行数\\n     */\\n    int deleteById({{=pkDataType}} {{=pkVarName}});\\n}\", \"Service\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkDataType = \\\"String\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    \\n}}package {{=pkgName}}.service;\\n$blankline\\nimport org.springframework.data.domain.Page;\\nimport org.springframework.data.domain.PageRequest;\\nimport {{=pkgName}}.entity.{{=beanClass}};\\n$blankline\\n\\n /**\\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务接口\\n * @author : http://www.chiner.pro\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n */\\npublic interface {{=serviceClass}}{\\n    /** \\n     * 通过ID查询单条数据 \\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 实例对象\\n     */\\n    {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}});\\n    \\n    /** \\n     * 分页查询\\n     *\\n     * @param {{=beanVarName}} 筛选条件\\n     * @param pageRequest 分页对象\\n     * @return 查询结果\\n     */\\n    Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest);\\n\\n    /** \\n     * 新增数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 实例对象\\n     */\\n    {{=beanClass}} insert({{=beanClass}} {{=beanVarName}});\\n\\n    \\n    /** \\n     * 更新数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 实例对象\\n     */\\n    {{=beanClass}} update({{=beanClass}} {{=beanVarName}});\\n\\n    /** \\n     * 通过主键删除数据\\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 是否成功\\n     */\\n    boolean deleteById({{=pkDataType}} {{=pkVarName}});\\n}\", \"applyFor\": \"895CFD1D-4273-4D32-A2C4-CAC70200AB5B\", \"Controller\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkDataType = \\\"String\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    \\n}}package {{=pkgName}}.controller;\\n$blankline\\nimport io.swagger.annotations.Api;\\nimport io.swagger.annotations.ApiOperation;\\nimport org.springframework.beans.factory.annotation.Autowired;\\nimport org.springframework.data.domain.Page;\\nimport org.springframework.data.domain.PageRequest;\\nimport org.springframework.http.ResponseEntity;\\nimport org.springframework.web.bind.annotation.*;\\nimport {{=pkgName}}.entity.{{=beanClass}};\\nimport {{=pkgName}}.service.{{=serviceClass}};\\n$blankline\\n\\n /**\\n * {{=it.entity.defName}};({{=it.entity.defKey}})表控制层\\n * @author : http://www.chiner.pro\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n */\\n@Api(tags = \\\"{{=it.entity.defName}}对象功能接口\\\")\\n@RestController\\n@RequestMapping(\\\"/{{=it.func.camel(it.entity.defKey,false)}}\\\")\\npublic class {{=beanClass}}Controller{\\n    @Autowired\\n    private {{=serviceClass}} {{=serviceVarName}};\\n    $blankline\\n    /** \\n     * 通过ID查询单条数据 \\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 实例对象\\n     */\\n    @ApiOperation(\\\"通过ID查询单条数据\\\")\\n    @GetMapping(\\\"{{{=it.func.camel(pkVarName,false)}}}\\\")\\n    public ResponseEntity<{{=beanClass}}> queryById({{=pkDataType}} {{=pkVarName}}){\\n        return ResponseEntity.ok({{=serviceVarName}}.queryById({{=pkVarName}}));\\n    }\\n    $blankline\\n    /** \\n     * 分页查询\\n     *\\n     * @param {{=beanVarName}} 筛选条件\\n     * @param pageRequest 分页对象\\n     * @return 查询结果\\n     */\\n    @ApiOperation(\\\"分页查询\\\")\\n    @GetMapping\\n    public ResponseEntity<Page<{{=beanClass}}>> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest){\\n        return ResponseEntity.ok({{=serviceVarName}}.paginQuery({{=beanVarName}}, pageRequest));\\n    }\\n    $blankline\\n    /** \\n     * 新增数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 实例对象\\n     */\\n    @ApiOperation(\\\"新增数据\\\")\\n    @PostMapping\\n    public ResponseEntity<{{=beanClass}}> add({{=beanClass}} {{=beanVarName}}){\\n        return ResponseEntity.ok({{=serviceVarName}}.insert({{=beanVarName}}));\\n    }\\n    $blankline\\n    /** \\n     * 更新数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 实例对象\\n     */\\n    @ApiOperation(\\\"更新数据\\\")\\n    @PutMapping\\n    public ResponseEntity<{{=beanClass}}> edit({{=beanClass}} {{=beanVarName}}){\\n        return ResponseEntity.ok({{=serviceVarName}}.update({{=beanVarName}}));\\n    }\\n    $blankline\\n    /** \\n     * 通过主键删除数据\\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 是否成功\\n     */\\n    @ApiOperation(\\\"通过主键删除数据\\\")\\n    @DeleteMapping\\n    public ResponseEntity<Boolean> deleteById({{=pkDataType}} {{=pkVarName}}){\\n        return ResponseEntity.ok({{=serviceVarName}}.deleteById({{=pkVarName}}));\\n    }\\n}\", \"Mapper.xml\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkDataType = \\\"String\\\";\\n    var pkField = \\\"UNDEFINED_ID\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkField = field.defKey;\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    \\n}}<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<!DOCTYPE mapper PUBLIC \\\"-//mybatis.org//DTD Mapper 3.0//EN\\\" \\\"http://mybatis.org/dtd/mybatis-3-mapper.dtd\\\">\\n<mapper namespace=\\\"{{=pkgName}}.mapper.{{=beanClass}}Mapper\\\">\\n    <resultMap type=\\\"{{=pkgName}}.entity.{{=beanClass}}\\\" id=\\\"{{=beanClass}}Map\\\">\\n    {{~it.entity.fields:field:index}}\\n        <result property=\\\"{{=it.func.camel(field.defKey,false)}}\\\" column=\\\"{{=field.defKey}}\\\" jdbcType=\\\"{{=field.dbType}}\\\"/>\\n    {{~}}\\n    </resultMap>\\n    $blankline\\n    <!-- 通过ID查询单条数据 -->\\n    <select id=\\\"queryById\\\" resultMap=\\\"{{=beanClass}}Map\\\">\\n        select\\n            {{=it.entity.fields.map(function(e,i){return e.defKey}).join(\',\')}}\\n        from {{=it.entity.defKey}}\\n        where {{=pkField}} = #{{{=pkVarName}}}\\n    </select>\\n    $blankline\\n    <!--分页查询指定行数据-->\\n    <select id=\\\"queryAllByLimit\\\" resultMap=\\\"{{=beanClass}}Map\\\">\\n        select\\n            {{=it.entity.fields.map(function(e,i){return e.defKey}).join(\',\')}}\\n        from {{=it.entity.defKey}}\\n        <where>\\n        {{~it.entity.fields:field:index}}\\n            <if test=\\\"{{=it.func.camel(field.defKey,false)}} != null and {{=it.func.camel(field.defKey,false)}} != \'\'\\\">\\n                and {{=field.defKey}} = #{{{=it.func.camel(field.defKey,false)}}}\\n            </if>\\n        {{~}}\\n        </where>\\n        limit #{pageable.offset}, #{pageable.pageSize}\\n    </select>\\n    $blankline\\n    <!--统计总行数-->\\n    <select id=\\\"count\\\" resultType=\\\"java.lang.Long\\\">\\n        select count(1)\\n        from {{=it.entity.defKey}}\\n        <where>\\n        {{~it.entity.fields:field:index}}\\n            <if test=\\\"{{=it.func.camel(field.defKey,false)}} != null and {{=it.func.camel(field.defKey,false)}} != \'\'\\\">\\n                and {{=field.defKey}} = #{{{=it.func.camel(field.defKey,false)}}}\\n            </if>\\n        {{~}}\\n        </where>\\n    </select>\\n    $blankline\\n    <!--新增数据-->\\n    <insert id=\\\"insert\\\" keyProperty=\\\"{{=pkField}}\\\" useGeneratedKeys=\\\"true\\\">\\n        insert into {{=it.entity.defKey}}({{=it.entity.fields.map(function(e,i){return e.defKey}).join(\',\')}})\\n        values ({{=it.entity.fields.map(function(e,i){return \'#{\'+it.func.camel(e.defKey,false)+\'}\'}).join(\',\')}})\\n    </insert>\\n    $blankline\\n    <!-- 批量新增数据 -->\\n    <insert id=\\\"insertBatch\\\" keyProperty=\\\"{{=pkField}}\\\" useGeneratedKeys=\\\"true\\\">\\n        insert into {{=it.entity.defKey}}({{=it.entity.fields.map(function(e,i){return e.defKey}).join(\',\')}})\\n        values\\n        <foreach collection=\\\"entities\\\" item=\\\"entity\\\" separator=\\\",\\\">\\n            ({{=it.entity.fields.map(function(e,i){return \'#{entity.\'+it.func.camel(e.defKey,false)+\'}\'}).join(\',\')}})\\n        </foreach>\\n    </insert>\\n    $blankline\\n    <!-- 批量新增或按主键更新数据 -->\\n    <insert id=\\\"insertOrUpdateBatch\\\" keyProperty=\\\"{{=pkField}}\\\" useGeneratedKeys=\\\"true\\\">\\n        insert into {{=it.entity.defKey}}({{=it.entity.fields.map(function(e,i){return e.defKey}).join(\',\')}})\\n        values\\n        <foreach collection=\\\"entities\\\" item=\\\"entity\\\" separator=\\\",\\\">\\n            ({{=it.entity.fields.map(function(e,i){return \'#{entity.\'+it.func.camel(e.defKey,false)+\'}\'}).join(\',\')}})\\n        </foreach>\\n        on duplicate key update\\n        {{=it.entity.fields.map(function(e,i){return e.defKey + \'=values(\'+e.defKey+\')\'}).join(\',\\\\n\\\\t\\\\t\')}}\\n    </insert>\\n    $blankline\\n    <!-- 更新数据 -->\\n    <update id=\\\"update\\\">\\n        update {{=it.entity.defKey}}\\n        <set>\\n        {{~it.entity.fields:field:index}}\\n            <if test=\\\"{{=it.func.camel(field.defKey,false)}} != null and {{=it.func.camel(field.defKey,false)}} != \'\'\\\">\\n                {{=field.defKey}} = #{{{=it.func.camel(field.defKey,false)}}},\\n            </if>\\n        {{~}}\\n        </set>\\n        where {{=pkField}} = #{{{=pkVarName}}}\\n    </update>\\n    $blankline\\n    <!--通过主键删除-->\\n    <delete id=\\\"deleteById\\\">\\n        delete from {{=it.entity.defKey}} where {{=pkField}} = #{{{=pkVarName}}}\\n    </delete>\\n</mapper>\\n\\n\", \"ServiceImpl\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkVarNameU = \\\"UndefinedId\\\";\\n    var pkDataType = \\\"String\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkVarNameU = it.func.camel(field.defKey,true);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    var mapperName = beanVarName+\'Mapper\';\\n    \\n}}package {{=pkgName}}.service.impl;\\n$blankline\\nimport org.springframework.beans.factory.annotation.Autowired;\\nimport org.springframework.stereotype.Service;\\nimport org.springframework.data.domain.Page;\\nimport org.springframework.data.domain.PageImpl;\\nimport org.springframework.data.domain.PageRequest;\\nimport {{=pkgName}}.entity.{{=beanClass}};\\nimport {{=pkgName}}.mapper.{{=beanClass}}Mapper;\\nimport {{=pkgName}}.service.{{=serviceClass}};\\n\\n /**\\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务实现类\\n * @author : http://www.chiner.pro\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n */\\n@Service\\npublic class {{=serviceClass}}Impl implements {{=serviceClass}}{\\n    @Autowired\\n    private {{=beanClass}}Mapper {{=mapperName}};\\n    $blankline\\n    /** \\n     * 通过ID查询单条数据 \\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 实例对象\\n     */\\n    public {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}}){\\n        return {{=mapperName}}.queryById({{=pkVarName}});\\n    }\\n    $blankline\\n    /** \\n     * 分页查询\\n     *\\n     * @param {{=beanVarName}} 筛选条件\\n     * @param pageRequest 分页对象\\n     * @return 查询结果\\n     */\\n    public Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest){\\n        long total = {{=mapperName}}.count({{=beanVarName}});\\n        return new PageImpl<>({{=mapperName}}.queryAllByLimit({{=beanVarName}}, pageRequest), pageRequest, total);\\n    }\\n    $blankline\\n    /** \\n     * 新增数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 实例对象\\n     */\\n    public {{=beanClass}} insert({{=beanClass}} {{=beanVarName}}){\\n        {{=mapperName}}.insert({{=beanVarName}});\\n        return {{=beanVarName}};\\n    }\\n    $blankline\\n    /** \\n     * 更新数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 实例对象\\n     */\\n    public {{=beanClass}} update({{=beanClass}} {{=beanVarName}}){\\n        {{=mapperName}}.update({{=beanVarName}});\\n        return queryById({{=beanVarName}}.get{{=pkVarNameU}}());\\n    }\\n    $blankline\\n    /** \\n     * 通过主键删除数据\\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 是否成功\\n     */\\n    public boolean deleteById({{=pkDataType}} {{=pkVarName}}){\\n        int total = {{=mapperName}}.deleteById({{=pkVarName}});\\n        return total > 0;\\n    }\\n}\"}, {\"type\": \"appCode\", \"Entity\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkDataType = \\\"String\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    \\n}}package {{=pkgName}}.entity;\\n$blankline\\nimport io.swagger.annotations.ApiModel;\\nimport io.swagger.annotations.ApiModelProperty;\\nimport com.baomidou.mybatisplus.annotation.TableName;\\nimport com.baomidou.mybatisplus.annotation.TableId;\\nimport java.io.Serializable;\\nimport java.util.Date;\\n$blankline\\n\\n /**\\n * {{=it.entity.defName}};{{=it.entity.comment}}\\n * @author : http://www.chiner.pro\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n */\\n@ApiModel(value = \\\"{{=it.entity.defName}}\\\",description = \\\"{{=it.entity.comment}}\\\")\\n@TableName(\\\"{{=it.entity.defKey}}\\\")\\npublic class {{=beanClass}} implements Serializable,Cloneable{\\n{{~it.entity.fields:field:index}}\\n    /** {{=it.func.join(field.defName,field.comment,\';\')}} */\\n    @ApiModelProperty(name = \\\"{{=field.defName}}\\\",notes = \\\"{{=field.comment}}\\\")\\n    {{? field.primaryKey }}\\n    @TableId\\n    {{?}}\\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\\n{{~}}\\n$blankline\\n\\n{{~it.entity.fields:field:index}}\\n    /** {{=it.func.join(field.defName,field.comment,\';\')}} */\\n    public {{=field.type}} get{{=it.func.camel(field.defKey,true)}}(){\\n        return this.{{=it.func.camel(field.defKey,false)}};\\n    }\\n    /** {{=it.func.join(field.defName,field.comment,\';\')}} */\\n    public void set{{=it.func.camel(field.defKey,true)}}({{=field.type}} {{= it.func.camel(field.defKey,false) }}){\\n        this.{{=it.func.camel(field.defKey,false)}}={{=it.func.camel(field.defKey,false)}};\\n    }\\n{{~}}\\n}\", \"Mapper\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkDataType = \\\"String\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    \\n}}package {{=pkgName}}.mapper;\\n$blankline\\n\\nimport com.baomidou.mybatisplus.core.conditions.Wrapper;\\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\\nimport com.baomidou.mybatisplus.core.metadata.IPage;\\nimport com.baomidou.mybatisplus.core.toolkit.Constants;\\nimport org.apache.ibatis.annotations.Mapper;\\nimport org.apache.ibatis.annotations.Param;\\nimport {{=pkgName}}.entity.{{=beanClass}};\\n$blankline\\n\\n /**\\n * {{=it.entity.defName}};({{=it.entity.defKey}})表数据库访问层\\n * @author : http://www.chiner.pro\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n */\\n@Mapper\\npublic interface {{=beanClass}}Mapper  extends BaseMapper<{{=beanClass}}>{\\n    /** \\n     * 分页查询指定行数据\\n     *\\n     * @param page 分页参数\\n     * @param wrapper 动态查询条件\\n     * @return 分页对象列表\\n     */\\n    IPage<{{=beanClass}}> selectByPage(IPage<{{=beanClass}}> page , @Param(Constants.WRAPPER) Wrapper<{{=beanClass}}> wrapper);\\n}\", \"Service\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkDataType = \\\"String\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    \\n}}package {{=pkgName}}.service;\\n$blankline\\nimport com.baomidou.mybatisplus.extension.plugins.pagination.Page;\\nimport {{=pkgName}}.entity.{{=beanClass}};\\n$blankline\\n\\n /**\\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务接口\\n * @author : http://www.chiner.pro\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n */\\npublic interface {{=serviceClass}}{\\n    $blankline\\n    /** \\n     * 通过ID查询单条数据 \\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 实例对象\\n     */\\n    {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}});\\n    $blankline\\n    /**\\n     * 分页查询\\n     *\\n     * @param {{=beanVarName}} 筛选条件\\n     * @param current 当前页码\\n     * @param size  每页大小\\n     * @return\\n     */\\n    Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, long current, long size);\\n\\n    /** \\n     * 新增数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 实例对象\\n     */\\n    {{=beanClass}} insert({{=beanClass}} {{=beanVarName}});\\n\\n    \\n    /** \\n     * 更新数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 实例对象\\n     */\\n    {{=beanClass}} update({{=beanClass}} {{=beanVarName}});\\n\\n    /** \\n     * 通过主键删除数据\\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 是否成功\\n     */\\n    boolean deleteById({{=pkDataType}} {{=pkVarName}});\\n}\", \"applyFor\": \"A2EE7B4A-CE62-4290-B00C-B26C1BF18073\", \"Controller\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkDataType = \\\"String\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    \\n}}package {{=pkgName}}.controller;\\n$blankline\\nimport java.util.List;\\nimport io.swagger.annotations.Api;\\nimport io.swagger.annotations.ApiOperation;\\nimport org.springframework.beans.factory.annotation.Autowired;\\nimport org.springframework.data.domain.PageImpl;\\nimport org.springframework.data.domain.PageRequest;\\nimport org.springframework.http.ResponseEntity;\\nimport org.springframework.web.bind.annotation.*;\\nimport {{=pkgName}}.entity.{{=beanClass}};\\nimport {{=pkgName}}.service.{{=serviceClass}};\\n$blankline\\n\\n /**\\n * {{=it.entity.defName}};({{=it.entity.defKey}})表控制层\\n * @author : http://www.chiner.pro\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n */\\n@Api(tags = \\\"{{=it.entity.defName}}对象功能接口\\\")\\n@RestController\\n@RequestMapping(\\\"/{{=it.func.camel(it.entity.defKey,false)}}\\\")\\npublic class {{=beanClass}}Controller{\\n    @Autowired\\n    private {{=serviceClass}} {{=serviceVarName}};\\n    $blankline\\n    /** \\n     * 通过ID查询单条数据 \\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 实例对象\\n     */\\n    @ApiOperation(\\\"通过ID查询单条数据\\\")\\n    @GetMapping(\\\"{{{=it.func.camel(pkVarName,false)}}}\\\")\\n    public ResponseEntity<{{=beanClass}}> queryById({{=pkDataType}} {{=pkVarName}}){\\n        return ResponseEntity.ok({{=serviceVarName}}.queryById({{=pkVarName}}));\\n    }\\n    $blankline\\n    /** \\n     * 分页查询\\n     *\\n     * @param {{=beanVarName}} 筛选条件\\n     * @param pageRequest 分页对象\\n     * @return 查询结果\\n     */\\n    @ApiOperation(\\\"分页查询\\\")\\n    @GetMapping\\n    public ResponseEntity<PageImpl<{{=beanClass}}>> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest){\\n        //1.分页参数\\n        long current = pageRequest.getPageNumber();\\n        long size = pageRequest.getPageSize();\\n\\n        //2.分页查询\\n        /*把Mybatis的分页对象做封装转换，MP的分页对象上有一些SQL敏感信息，还是通过spring的分页模型来封装数据吧*/\\n        com.baomidou.mybatisplus.extension.plugins.pagination.Page<{{=beanClass}}> pageResult = {{=serviceVarName}}.paginQuery({{=beanVarName}}, current,size);\\n\\n        //3. 分页结果组装\\n        List<{{=beanClass}}> dataList = pageResult.getRecords();\\n        long total = pageResult.getTotal();\\n        PageImpl<{{=beanClass}}> retPage = new PageImpl<{{=beanClass}}>(dataList,pageRequest,total);\\n        return ResponseEntity.ok(retPage);\\n    }\\n    $blankline\\n    /** \\n     * 新增数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 实例对象\\n     */\\n    @ApiOperation(\\\"新增数据\\\")\\n    @PostMapping\\n    public ResponseEntity<{{=beanClass}}> add({{=beanClass}} {{=beanVarName}}){\\n        return ResponseEntity.ok({{=serviceVarName}}.insert({{=beanVarName}}));\\n    }\\n    $blankline\\n    /** \\n     * 更新数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 实例对象\\n     */\\n    @ApiOperation(\\\"更新数据\\\")\\n    @PutMapping\\n    public ResponseEntity<{{=beanClass}}> edit({{=beanClass}} {{=beanVarName}}){\\n        return ResponseEntity.ok({{=serviceVarName}}.update({{=beanVarName}}));\\n    }\\n    $blankline\\n    /** \\n     * 通过主键删除数据\\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 是否成功\\n     */\\n    @ApiOperation(\\\"通过主键删除数据\\\")\\n    @DeleteMapping\\n    public ResponseEntity<Boolean> deleteById({{=pkDataType}} {{=pkVarName}}){\\n        return ResponseEntity.ok({{=serviceVarName}}.deleteById({{=pkVarName}}));\\n    }\\n}\", \"Mapper.xml\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkDataType = \\\"String\\\";\\n    var pkField = \\\"UNDEFINED_ID\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkField = field.defKey;\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    \\n}}<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<!DOCTYPE mapper PUBLIC \\\"-//mybatis.org//DTD Mapper 3.0//EN\\\" \\\"http://mybatis.org/dtd/mybatis-3-mapper.dtd\\\">\\n$blankline\\n\\n<mapper namespace=\\\"{{=pkgName}}.mapper.{{=beanClass}}Mapper\\\">\\n     <select id=\\\"selectByPage\\\" resultType=\\\"{{=pkgName}}.entity.{{=beanClass}}\\\">\\n        select * from user ${ew.customSqlSegment}\\n    </select>\\n</mapper>\\n\\n\", \"ServiceImpl\": \"{{  var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1;\\n    var days=today.getDate();\\n    \\n    var pkVarName = \\\"undefinedId\\\";\\n    var pkVarNameU = \\\"UndefinedId\\\";\\n    var pkFieldKey = \\\"UNDEFINED\\\";\\n    var pkDataType = \\\"String\\\";\\n    it.entity.fields.forEach(function(field){\\n        if(field.primaryKey){\\n            pkFieldKey = field.defKey;\\n            pkVarName = it.func.camel(field.defKey,false);\\n            pkVarNameU = it.func.camel(field.defKey,true);\\n            pkDataType = field[\\\"type\\\"];\\n            return;\\n        }\\n    });\\n    \\n    var pkgName = it.entity.env.base.nameSpace;\\n    var beanClass = it.entity.env.base.codeRoot;\\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\\n    var serviceClass = beanClass+\'Service\';\\n    var serviceVarName= beanVarName+\'Service\';\\n    var mapperName = beanVarName+\'Mapper\';\\n    \\n}}package {{=pkgName}}.service.impl;\\n$blankline\\nimport cn.hutool.core.util.StrUtil;\\nimport org.springframework.beans.factory.annotation.Autowired;\\nimport org.springframework.stereotype.Service;\\nimport com.baomidou.mybatisplus.core.metadata.IPage;\\nimport com.baomidou.mybatisplus.extension.plugins.pagination.Page;\\nimport com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;\\nimport com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;\\n\\nimport {{=pkgName}}.entity.{{=beanClass}};\\nimport {{=pkgName}}.mapper.{{=beanClass}}Mapper;\\nimport {{=pkgName}}.service.{{=serviceClass}};\\n\\n /**\\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务实现类\\n * @author : http://www.chiner.pro\\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\\n */\\n@Service\\npublic class {{=serviceClass}}Impl implements {{=serviceClass}}{\\n    @Autowired\\n    private {{=beanClass}}Mapper {{=mapperName}};\\n    $blankline\\n    /** \\n     * 通过ID查询单条数据 \\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 实例对象\\n     */\\n    public {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}}){\\n        return {{=mapperName}}.selectById({{=pkVarName}});\\n    }\\n    $blankline\\n    /**\\n     * 分页查询\\n     *\\n     * @param {{=beanVarName}} 筛选条件\\n     * @param current 当前页码\\n     * @param size  每页大小\\n     * @return\\n     */\\n    public Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, long current, long size){\\n        //1. 构建动态查询条件\\n        LambdaQueryWrapper<{{=beanClass}}> queryWrapper = new LambdaQueryWrapper<>();\\n        {{~it.entity.fields.filter(function(e){return e[\\\"type\\\"]===\\\"String\\\"&&e.defKey !== pkFieldKey}):field:index}}\\n        if(StrUtil.isNotBlank({{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}())){\\n            queryWrapper.eq({{=beanClass}}::get{{=it.func.camel(field.defKey,true)}}, {{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}());\\n        }\\n        {{~}}\\n\\n        //2. 执行分页查询\\n        Page<{{=beanClass}}> pagin = new Page<>(current , size , true);\\n        IPage<{{=beanClass}}> selectResult = {{=mapperName}}.selectByPage(pagin , queryWrapper);\\n        pagin.setPages(selectResult.getPages());\\n        pagin.setTotal(selectResult.getTotal());\\n        pagin.setRecords(selectResult.getRecords());\\n\\n        //3. 返回结果\\n        return pagin;\\n    }\\n    $blankline\\n    /** \\n     * 新增数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 实例对象\\n     */\\n    public {{=beanClass}} insert({{=beanClass}} {{=beanVarName}}){\\n        {{=mapperName}}.insert({{=beanVarName}});\\n        return {{=beanVarName}};\\n    }\\n    $blankline\\n    /** \\n     * 更新数据\\n     *\\n     * @param {{=beanVarName}} 实例对象\\n     * @return 实例对象\\n     */\\n    public {{=beanClass}} update({{=beanClass}} {{=beanVarName}}){\\n        //1. 根据条件动态更新\\n        LambdaUpdateChainWrapper<{{=beanClass}}> chainWrapper = new LambdaUpdateChainWrapper<{{=beanClass}}>({{=mapperName}});\\n        {{~it.entity.fields.filter(function(e){return e[\\\"type\\\"]===\\\"String\\\"&&e.defKey !== pkFieldKey}):field:index}}\\n        if(StrUtil.isNotBlank({{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}())){\\n            chainWrapper.eq({{=beanClass}}::get{{=it.func.camel(field.defKey,true)}}, {{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}());\\n        }\\n        {{~}}\\n        //2. 设置主键，并更新\\n        chainWrapper.set({{=beanClass}}::get{{=pkVarNameU}}, {{=beanVarName}}.get{{=pkVarNameU}}());\\n        boolean ret = chainWrapper.update();\\n        //3. 更新成功了，查询最最对象返回\\n        if(ret){\\n            return queryById({{=beanVarName}}.get{{=pkVarNameU}}());\\n        }else{\\n            return {{=beanVarName}};\\n        }\\n    }\\n    $blankline\\n    /** \\n     * 通过主键删除数据\\n     *\\n     * @param {{=pkVarName}} 主键\\n     * @return 是否成功\\n     */\\n    public boolean deleteById({{=pkDataType}} {{=pkVarName}}){\\n        int total = {{=mapperName}}.deleteById({{=pkVarName}});\\n        return total > 0;\\n    }\\n}\"}, {\"type\": \"dbDDL\", \"update\": \"{{\\n    let createEntities = it.changes.filter(function(row){return (row.opt===\'add\'&&row[\'type\']===\'entity\');});\\n    let dropEntities   = it.changes.filter(function(row){return (row.opt===\'delete\'&&row[\'type\']===\'entity\');});\\n    let modifyEntities = it.changes.filter(function(row){return (row.opt===\'update\'&&row[\'type\']===\'entity\');});\\n    \\n    function baseChangedDDL(beforeAfter){\\n        if(beforeAfter == null){\\n            return \'\';\\n        }\\n        let ret = [];\\n        let before = beforeAfter.before || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        let after = beforeAfter.after || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        if(before.defKey !== after.defKey){\\n            ret.push(\'ALTER TABLE \'+before.defKey+\' RENAME TO \'+after.defKey);\\n        }\\n        let commentText = \'\';\\n        let commentChanged = false;\\n        if(before.defName !== after.defName){\\n            commentText = after.defName;\\n            commentChanged = true;\\n        }\\n        if(before.comment !== after.comment){\\n            commentChanged = true;\\n            if(commentText){\\n                commentText = (commentText+ \';\'+after.comment)\\n            }else{\\n                commentText = after.comment\\n            }\\n        }\\n        if(commentChanged){\\n            ret.push(\'ALTER TABLE \'+after.defKey+\' COMMENT \\\\\'\'+commentText+\'\\\\\'\');\\n        }\\n        let baseText = \'-- 基本信息:\\\\n\';\\n        return baseText+ret.join(\';\\\\n\')+\';\';\\n    };\\n    \\n    function buildAddedDDL(entity){\\n        let ret = [];\\n        let fieldAdded = entity.data.fieldAdded||[];\\n        if(fieldAdded.length == 0){\\n            return \'\';\\n        }\\n        \\n        let firstDDL = \'ALTER TABLE \'+entity.data.baseInfo.defKey;\\n        for (let field of fieldAdded) { \\n            let ddlItem = \'ADD COLUMN `\'+field.defKey+\'` \'+field.dbType;\\n            /*处理数据类型长度*/\\n            if(field.len>0){\\n                ddlItem += (\'(\'+field.len);\\n                if(parseInt(field.scale)>0){\\n                    ddlItem += (\',\'+field.scale);\\n                }\\n                ddlItem += \')\';\\n            }\\n            if(field.notNull){\\n                ddlItem += \' NOT NULL\';\\n            }\\n            if(field.autoIncrement){\\n                ddlItem += \' AUTO_INCREMENT\';\\n            }\\n            if(field.defaultValue){\\n                ddlItem += (\' DEFAULT \' + field.defaultValue);\\n            }\\n            ddlItem += (\' COMMENT \\\\\'\'+field.defName+\';\'+field.comment+\'\\\\\'\');\\n            \\n            if(field.index>0 && field.afterFieldKey){\\n                ddlItem += (\' AFTER \'+field.afterFieldKey);\\n            }\\n            ret.push(ddlItem);\\n        }\\n        return firstDDL+\'\\\\n\'+ret.join(\',\\\\n\');\\n    };\\n    \\n    function buildRemovedDDL(entity){\\n        let ret = [];\\n        let fieldRemoved = entity.data.fieldRemoved||[];\\n        if(fieldRemoved.length == 0){\\n            return \'\';\\n        }\\n        \\n        let firstDDL = \'ALTER TABLE \'+entity.data.baseInfo.defKey;\\n        for (let field of fieldRemoved) { \\n            ret.push(\'DROP \'+field.defKey);\\n        }\\n        return firstDDL+\'\\\\n\'+ret.join(\',\\\\n\');\\n    };\\n    \\n    function buildModifiedDDL(entity){\\n        let ret = [];\\n        let fieldModified = entity.data.fieldModified||[];\\n        \\n        let firstDDL = \'ALTER TABLE \'+entity.data.baseInfo.defKey;\\n        for (let field of fieldModified) { \\n            let changeDDL = \'\';\\n            let before = field.before || {};\\n            let after = field.after || {};\\n            if(before.defKey === after.defKey){\\n                changeDDL += (\' MODIFY COLUMN `\'+after.defKey+\'`\');\\n            }else{\\n                changeDDL += (\' CHANGE COLUMN `\'+before.defKey+\'` `\'+after.defKey+\'`\');\\n            }\\n            changeDDL += (\' \'+after.dbType);\\n            if(after.len>0){\\n                changeDDL += (\'(\'+after.len);\\n                if(parseInt(after.scale)>0){\\n                    changeDDL += (\',\'+after.scale);\\n                }\\n                changeDDL += \')\';\\n            }\\n            if(after.notNull){\\n                changeDDL += \' NOT NULL\';\\n            }\\n            let defaultValue = \'\';\\n            if(after.defaultValue != null && after.defaultValue.length>0){\\n                defaultValue = (after.defaultValue);\\n            }else{\\n                defaultValue = \'NULL\';\\n            }\\n            if(defaultValue != \'NULL\'){\\n                changeDDL += (\' DEFAULT \' + defaultValue);\\n            }\\n\\n            let comment = after.defName;\\n            if(after.comment){\\n                comment = comment + \';\' + (after.comment||\'\');\\n            }\\n            if(comment){\\n                changeDDL += (\' COMMENT \\\\\'\'+comment+\'\\\\\';\');\\n            }\\n            \\n            ret.push(firstDDL+\' \'+changeDDL);\\n        }\\n        return ret;\\n    };\\n}}\\n{{? createEntities && createEntities.length > 0}}\\n/* --------------- 创建表 --------------- */\\n{{~ createEntities:entity}}\\n{{=it.func.createDDL(entity.data,entity[\'type\'])}}\\n{{~}}\\n{{?}}\\n\\n\\n{{? dropEntities && dropEntities.length > 0}}\\n/* --------------- 删除表 --------------- */\\n{{~ dropEntities:entity}}\\n{{=it.func.dropDDL(entity.data,entity[\'type\'])}}\\n{{~}}\\n{{?}}\\n\\n\\n{{? modifyEntities && modifyEntities.length > 0}}\\n{{~ modifyEntities:entity}}\\n/* --------------- 修改表 --------------- */\\n-- 修改表：{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\\n{{=baseChangedDDL(entity.data.baseChanged)}}\\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\\n-- 修改字段：\\n{{=buildModifiedDDL(entity).join(\'\\\\n\')}}\\n{{?}}{{\\n/*索引是否修改过*/\\nlet indexChanged = entity.data.indexChanged;\\n}}\\n{{? indexChanged }}\\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity[\'type\'])}}\\n{{?}}\\n\\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\\n-- 添加字段：\\n{{=buildAddedDDL(entity)}};\\n{{?}}\\n\\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\\n-- 删除字段：\\n{{=buildRemovedDDL(entity)}};\\n{{?}}\\n{{~}}\\n{{?}}\", \"message\": \"{{\\n    let createEntities = it.changes.filter(function(row){return (row.opt===\'add\'&&row[\'type\']===\'entity\');});\\n    let dropEntities   = it.changes.filter(function(row){return (row.opt===\'delete\'&&row[\'type\']===\'entity\');});\\n    let modifyEntities = it.changes.filter(function(row){return (row.opt===\'update\'&&row[\'type\']===\'entity\');});\\n    \\n    function baseChanged(beforeAfter){\\n        if(beforeAfter == null){\\n            return \'\';\\n        }\\n        let ret = [];\\n        let before = beforeAfter.before || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        let after = beforeAfter.after || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        if(before.defKey !== after.defKey){\\n            ret.push(\'代码:\'+(before.defKey||\'NULL\')+\'->\'+(after.defKey||\'NULL\'));\\n        }\\n        if(before.defName !== after.defName){\\n            ret.push(\'显示名称:\'+(before.defName||\'NULL\')+\'->\'+(after.defName||\'NULL\'));\\n        }\\n        if(before.comment !== after.comment){\\n            ret.push(\'说明:\'+(before.comment||\'NULL\')+\'->\'+(after.comment||\'NULL\'));\\n        }\\n        if(ret.length>0){\\n            return \'    基本信息:\\\\n\\\\t\'+ret.join(\'\\\\n\\\\t\');\\n        }\\n        return \'\';\\n    };\\n    \\n    function buildAddedDesc(entity){\\n        let ret = [];\\n        let fieldAdded = entity.data.fieldAdded||[];\\n        \\n        for (let field of fieldAdded) { \\n            let row = [];\\n            row.push(field.defKey+\'[\'+field.defName+\']\');\\n            ret.push(row.join(\\\"\\\"))\\n        }\\n        return ret;\\n    };\\n    \\n    function buildRemovedDesc(entity){\\n        let ret = [];\\n        let fieldRemoved = entity.data.fieldRemoved||[];\\n        \\n        for (let field of fieldRemoved) { \\n            let row = [];\\n            row.push(field.defKey+\'[\'+field.defName+\']\');\\n            ret.push(row.join(\\\"\\\"))\\n        }\\n        return ret;\\n    };\\n    \\n    function buildModifiedDesc(entity){\\n        let ret = [];\\n        let fieldModified = entity.data.fieldModified||[];\\n        \\n        for (let field1 of fieldModified) { \\n            let row = [];\\n            let field = field1.before;\\n            row.push(field.defKey+\'[\'+field.defName+\']\');\\n            ret.push(row.join(\\\"\\\"))\\n        }\\n        return ret;\\n    };\\n}}\\n\\n\\n{{? createEntities && createEntities.length > 0}}\\n/* --------------- 创建表 --------------- */\\n{{~ createEntities:entity}}\\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\\n{{~}}\\n{{?}}\\n\\n\\n{{? dropEntities && dropEntities.length > 0}}\\n/* --------------- 删除表 --------------- */\\n{{~ dropEntities:entity}}\\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\\n{{~}}\\n{{?}}\\n\\n{{? modifyEntities && modifyEntities.length > 0}}\\n/* --------------- 修改表 --------------- */\\n{{~ modifyEntities:entity}}\\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\\n{{=baseChanged(entity.data.baseChanged)}}\\n    {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\\n    修改字段：\\n    {{=\'\\\\t\'}}{{=buildModifiedDesc(entity).join(\'\\\\n\\\\t\')}}{{?}}{{\\n        /*计算是否调整了属性*/\\n        let propAdded = entity.data.propAdded || [];\\n        let propRemoved = entity.data.propRemoved || [];\\n        let propModified = entity.data.propModified || [];\\n        let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\\n        /*计算关联是否调整*/\\n        let refEntityAdd = entity.data.refEntityAdd || [];\\n        let refEntityRemoved = entity.data.refEntityRemoved || [];\\n        let relaArray = [];\\n        for (let rela of refEntityAdd) {\\n            relaArray.push(\'建立关联:\'+rela.defKey+\'[\'+rela.defName+\']\');\\n        }\\n        for (let rela of refEntityRemoved) {\\n            relaArray.push(\'解除关联:\'+rela.defKey+\'[\'+rela.defName+\']\');\\n        }\\n        /*索引是否修改过*/\\n        let indexChanged = entity.data.indexChanged;\\n    }}{{=indexChanged?\'\\\\n\\\\t更改了索引\':\'\'}}{{=changed?\'\\\\n\\\\t更改了属性\':\'\'}}{{=relaArray.length>0?(\'\\\\n\\\\t\'+relaArray.join(\'\\\\n\\\\t\')):\'\'}}\\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\\n    添加字段：\\n{{=\'\\\\t\'}}{{=buildAddedDesc(entity).join(\'\\\\n\\\\t\')}}\\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\\n    删除字段：\\n{{=\'\\\\t\'}}{{=buildRemovedDesc(entity).join(\'\\\\n\\\\t\')}}\\n{{?}}\\n{{~}}\\n{{?}}\\n\", \"applyFor\": \"29D1CE08-4C35-4D2D-AAA9-23D93305B52E\", \"createView\": \"CREATE VIEW {{=it.view.defKey}} AS\\nSELECT \\n{{~it.view.fields:field:index}}\\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? \',\' : \'\'}}\\n{{~}}\\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? \',\' : \'\'}}{{~}};\\n$blankline\\n\", \"createIndex\": \"{{~ it.entity.indexes:index}}\\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,\',\')}});\\n{{~}}\", \"createTable\": \"DROP TABLE IF EXISTS {{=it.entity.defKey}};\\nCREATE TABLE {{=it.entity.defKey}}(\\n{{ pkList = [] ; }}\\n{{~it.entity.fields:field:index}}\\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\\n    `{{=field.defKey}}` {{=field.dbType}}{{?field.len>0}}{{=\'(\'}}{{=field.len}}{{?field.scale>0}}{{=\',\'}}{{=field.scale}}{{?}}{{=\')\'}}{{?}} {{= field.notNull ? \'NOT NULL\' : \'\' }} {{= field.autoIncrement ? \'AUTO_INCREMENT\' : \'\' }} {{= field.defaultValue ? it.func.join(\'DEFAULT\',field.defaultValue,\' \') : \'\' }} COMMENT \'{{=it.func.join(field.defName,field.comment,\';\')}}\' {{= index < it.entity.fields.length-1 ? \',\' : ( pkList.length>0 ? \',\' :\'\' ) }}\\n{{~}}\\n{{? pkList.length >0 }}\\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? \',\' : \'\' }}{{~}})\\n{{?}}\\n)  COMMENT = \'{{=it.func.join(it.entity.defName,it.entity.comment,\';\') }}\';\\n$blankline\\n\", \"deleteIndex\": \"{{~ it.entity.indexes:index}}\\nDROP INDEX IF EXISTS {{=index.defKey}} ;\\n{{~}}\", \"deleteTable\": \"DROP TABLE IF EXISTS {{=it.entity.defKey}};\"}, {\"type\": \"dbDDL\", \"update\": \"{{\\n    let createEntities = it.changes.filter(function(row){return (row.opt===\'add\'&&row[\'type\']===\'entity\');});\\n    let dropEntities   = it.changes.filter(function(row){return (row.opt===\'delete\'&&row[\'type\']===\'entity\');});\\n    let modifyEntities = it.changes.filter(function(row){return (row.opt===\'update\'&&row[\'type\']===\'entity\');});\\n    \\n    function baseChangedDDL(beforeAfter){\\n        if(beforeAfter == null){\\n            return \'\';\\n        }\\n        let ret = [];\\n        let before = beforeAfter.before || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        let after = beforeAfter.after || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        if(before.defKey !== after.defKey){\\n            ret.push(`ALTER TABLE ${before.defKey} RENAME TO ${after.defKey}`);\\n        }\\n        let commentText = \'\';\\n        let commentChanged = false;\\n        if(before.defName !== after.defName){\\n            commentText = after.defName;\\n            commentChanged = true;\\n        }\\n        if(before.comment !== after.comment){\\n            commentChanged = true;\\n            if(commentText){\\n                commentText = (commentText+ \';\'+after.comment)\\n            }else{\\n                commentText = after.comment\\n            }\\n        }\\n        if(commentChanged){\\n            let myText = `COMMENT ON TABLE ${after.defKey} IS \'${commentText}\'`;\\n            ret.push(myText);\\n        }\\n        let baseText = \'-- 基本信息:\\\\n\';\\n        return baseText+ret.join(\';\\\\n\')+\';\';\\n    };\\n    \\n    function buildAddedDDL(entity){\\n        let ret = [];\\n        let fieldAdded = entity.data.fieldAdded||[];\\n        if(fieldAdded.length == 0){\\n            return \'\';\\n        }\\n        \\n        let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\\n        for (let field of fieldAdded) { \\n            let ddlItem = `ADD (${field.defKey} ${field.dbType}`;\\n            /*处理数据类型长度*/\\n            if(field.len>0){\\n                ddlItem += (\'(\'+field.len);\\n                if(parseInt(field.scale)>0){\\n                    ddlItem += (\',\'+field.scale);\\n                }\\n                ddlItem += \')\';\\n            }\\n            let defaultValue = field.defaultValue;\\n            defaultValue = (defaultValue==null)?\\\"\\\":(\\\"\\\"+defaultValue);\\n            if(defaultValue.length>0){\\n                ddlItem += (\' DEFAULT \' + defaultValue);\\n            }\\n            if(field.notNull){\\n                ddlItem += \' NOT NULL\';\\n            }\\n            ddlItem += \')\';\\n            ret.push(`${firstDDL} ${ddlItem}`);\\n            \\n            /*处理字段注释*/\\n            let fieldComments = [];\\n            if(field.defName != null &&field.defName.length>0){\\n                fieldComments.push(field.defName);\\n            }\\n            if(field.comment != null &&field.comment.length>0){\\n                fieldComments.push(field.comment);\\n            }\\n            let commentText = fieldComments.join(\';\');\\n            if(commentText != null && commentText.length > 0){\\n                let commentDDL = `COMMENT ON COLUMN ${entity.data.baseInfo.defKey}.${field.defKey} IS \'${commentText}\'`;\\n                 ret.push(commentDDL);\\n            }\\n        }\\n        return \'\\\\n\'+ret.join(\';\\\\n\');\\n    };\\n    \\n    function buildRemovedDDL(entity){\\n        let ret = [];\\n        let fieldRemoved = entity.data.fieldRemoved||[];\\n        if(fieldRemoved.length == 0){\\n            return \'\';\\n        }\\n        \\n        let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\\n        for (let field of fieldRemoved) { \\n            ret.push(`${firstDDL} DROP COLUMN ${field.defKey}`);\\n        }\\n        return \'\\\\n\'+ret.join(\';\\\\n\');\\n    };\\n    \\n    function buildModifiedDDL(entity){\\n        let ret = [];\\n        let fieldModified = entity.data.fieldModified||[];\\n        \\n        let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\\n        for (let field of fieldModified) { \\n            let changeDDL = \'\';\\n            let before = field.before || {};\\n            let after = field.after || {};\\n            if(before.defKey !== after.defKey){\\n                let renameText = `ALTER TABLE ${entity.data.baseInfo.defKey} RENAME COLUMN ${before.defKey} TO ${after.defKey};`;\\n                ret.push(renameText);\\n            }\\n            /*如果没有变化，则不生成变更语句*/\\n            if(before.dbType === after.dbType \\n            && before[\'len\'] === after[\'len\'] \\n            && before.scale === after.scale\\n            && before.primaryKey === after.primaryKey\\n            && before.notNull === after.notNull\\n            && before.autoIncrement === after.autoIncrement\\n            && before.defaultValue === after.defaultValue){\\n                continue;\\n            }\\n            changeDDL += (\'MODIFY (\'+after.defKey+\'\');\\n            changeDDL += (\' \'+after.dbType);\\n            if(after.len>0){\\n                changeDDL += (\'(\'+after.len);\\n                if(parseInt(after.scale)>0){\\n                    changeDDL += (\',\'+after.scale);\\n                }\\n                changeDDL += \')\';\\n            }\\n            let defaultValue = after.defaultValue;\\n            defaultValue = (defaultValue==null)?\\\"\\\":(\\\"\\\"+defaultValue);\\n            if(defaultValue.length>0){\\n                changeDDL += (\' DEFAULT \' + defaultValue);\\n            }\\n            \\n            if(after.notNull){\\n                changeDDL += \' NOT NULL\';\\n            }\\n            changeDDL += \')\';\\n            ret.push(`${firstDDL} ${changeDDL};`);\\n        }\\n        return ret;\\n    };\\n}}\\n{{? createEntities && createEntities.length > 0}}\\n/* --------------- 创建表 --------------- */\\n{{~ createEntities:entity}}\\n{{=it.func.createDDL(entity.data,entity[\'type\'])}}\\n{{~}}\\n{{?}}\\n\\n\\n{{? dropEntities && dropEntities.length > 0}}\\n/* --------------- 删除表 --------------- */\\n{{~ dropEntities:entity}}\\n{{=it.func.dropDDL(entity.data,entity[\'type\'])}}\\n{{~}}\\n{{?}}\\n\\n\\n{{? modifyEntities && modifyEntities.length > 0}}\\n{{~ modifyEntities:entity}}\\n/* --------------- 修改表 --------------- */\\n-- 修改表：{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\\n{{=baseChangedDDL(entity.data.baseChanged)}}\\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\\n-- 修改字段：\\n{{=buildModifiedDDL(entity).join(\'\\\\n\')}}\\n{{?}}{{\\n/*索引是否修改过*/\\nlet indexChanged = entity.data.indexChanged;\\n}}\\n{{? indexChanged }}\\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity[\'type\'])}}\\n{{?}}\\n\\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\\n-- 添加字段：\\n{{=buildAddedDDL(entity)}};\\n{{?}}\\n\\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\\n-- 删除字段：\\n{{=buildRemovedDDL(entity)}};\\n{{?}}\\n{{~}}\\n{{?}}\", \"message\": \"{{\\n    let createEntities = it.changes.filter(function(row){return (row.opt===\'add\'&&row[\'type\']===\'entity\');});\\n    let dropEntities   = it.changes.filter(function(row){return (row.opt===\'delete\'&&row[\'type\']===\'entity\');});\\n    let modifyEntities = it.changes.filter(function(row){return (row.opt===\'update\'&&row[\'type\']===\'entity\');});\\n    \\n    function baseChanged(beforeAfter){\\n        if(beforeAfter == null){\\n            return \'\';\\n        }\\n        let ret = [];\\n        let before = beforeAfter.before || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        let after = beforeAfter.after || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        if(before.defKey !== after.defKey){\\n            ret.push(\'代码:\'+(before.defKey||\'NULL\')+\'->\'+(after.defKey||\'NULL\'));\\n        }\\n        if(before.defName !== after.defName){\\n            ret.push(\'显示名称:\'+(before.defName||\'NULL\')+\'->\'+(after.defName||\'NULL\'));\\n        }\\n        if(before.comment !== after.comment){\\n            ret.push(\'说明:\'+(before.comment||\'NULL\')+\'->\'+(after.comment||\'NULL\'));\\n        }\\n        if(ret.length>0){\\n            return \'    基本信息:\\\\n\\\\t\'+ret.join(\'\\\\n\\\\t\');\\n        }\\n        return \'\';\\n    };\\n    \\n    function buildAddedDesc(entity){\\n        let ret = [];\\n        let fieldAdded = entity.data.fieldAdded||[];\\n        \\n        for (let field of fieldAdded) { \\n            let row = [];\\n            row.push(field.defKey+\'[\'+field.defName+\']\');\\n            ret.push(row.join(\\\"\\\"))\\n        }\\n        return ret;\\n    };\\n    \\n    function buildRemovedDesc(entity){\\n        let ret = [];\\n        let fieldRemoved = entity.data.fieldRemoved||[];\\n        \\n        for (let field of fieldRemoved) { \\n            let row = [];\\n            row.push(field.defKey+\'[\'+field.defName+\']\');\\n            ret.push(row.join(\\\"\\\"))\\n        }\\n        return ret;\\n    };\\n    \\n    function buildModifiedDesc(entity){\\n        let ret = [];\\n        let fieldModified = entity.data.fieldModified||[];\\n        \\n        for (let field1 of fieldModified) { \\n            let row = [];\\n            let field = field1.before;\\n            row.push(field.defKey+\'[\'+field.defName+\']\');\\n            ret.push(row.join(\\\"\\\"))\\n        }\\n        return ret;\\n    };\\n}}\\n{{? createEntities && createEntities.length > 0}}\\n/* -------------------------------------------------- */\\n创建表：\\n{{~ createEntities:entity}}\\n    {{=entity.data.defKey}}[{{=entity.data.defName}}]\\n{{~}}\\n{{?}}\\n\\n\\n{{? dropEntities && dropEntities.length > 0}}\\n/* -------------------------------------------------- */\\n删除表：\\n{{~ dropEntities:entity}}\\n    {{=entity.data.defKey}}[{{=entity.data.defName}}]\\n{{~}}\\n{{?}}\\n\\n\\n{{? modifyEntities && modifyEntities.length > 0}}\\n{{~ modifyEntities:entity}}\\n/* -------------------------------------------------- */\\n修改表：{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\\n{{=baseChanged(entity.data.baseChanged)}}\\n    {{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\\n    添加字段：\\n    {{=\'\\\\t\'}}{{=buildAddedDesc(entity).join(\'\\\\n\\\\t\')}}\\n    {{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\\n    删除字段：\\n    {{=\'\\\\t\'}}{{=buildRemovedDesc(entity).join(\'\\\\n\\\\t\')}}\\n    {{?}}{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\\n    修改字段：\\n    {{=\'\\\\t\'}}{{=buildModifiedDesc(entity).join(\'\\\\n\\\\t\')}}\\n    {{?}}{{\\n        /*计算是否调整了属性*/\\n        let propAdded = entity.data.propAdded || [];\\n        let propRemoved = entity.data.propRemoved || [];\\n        let propModified = entity.data.propModified || [];\\n        let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\\n        /*计算关联是否调整*/\\n        let refEntityAdd = entity.data.refEntityAdd || [];\\n        let refEntityRemoved = entity.data.refEntityRemoved || [];\\n        let relaArray = [];\\n        for (let rela of refEntityAdd) {\\n            relaArray.push(\'\\\\n\\\\t建立关联:\'+rela.defKey+\'[\'+rela.defName+\']\');\\n        }\\n        for (let rela of refEntityRemoved) {\\n            relaArray.push(\'\\\\n\\\\t解除关联:\'+rela.defKey+\'[\'+rela.defName+\']\');\\n        }\\n        /*索引是否修改过*/\\n        let indexChanged = entity.data.indexChanged;\\n    }}\\n{{=indexChanged?\'\\\\n\\\\t更改了索引\':\'\'}}\\n{{=changed?\'\\\\n\\\\t更改了属性\':\'\'}}\\n{{=relaArray.length>0?relaArray.join(\'\'):\'\'}}\\n{{~}}\\n{{?}}\", \"applyFor\": \"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542\", \"createView\": \"CREATE VIEW {{=it.view.defKey}} AS\\nSELECT \\n{{~it.view.fields:field:index}}\\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? \',\' : \'\'}}\\n{{~}}\\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? \',\' : \'\'}}{{~}};\\n$blankline\\n\", \"createIndex\": \"{{~ it.entity.indexes:index}}\\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,\',\')}});\\n{{~}}\", \"createTable\": \"CREATE TABLE {{=it.entity.defKey}}(\\n{{ pkList = [] ; }}\\n{{~it.entity.fields:field:index}}\\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{=\'(\'}}{{=field.len}}{{?field.scale>0}}{{=\',\'}}{{=field.scale}}{{?}}{{=\')\'}}{{?}}{{= field.defaultValue ? it.func.join(\' DEFAULT \',field.defaultValue,\' \') : \'\' }}{{= field.notNull ? \' NOT NULL\' : \'\' }}{{= field.autoIncrement ? \'\' : \'\' }}{{= index < it.entity.fields.length-1 ? \',\' : ( pkList.length>0 ? \',\' :\'\' ) }}\\n{{~}}\\n{{? pkList.length >0 }}\\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? \',\' : \'\' }}{{~}})\\n{{?}}\\n);\\n$blankline\\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS \'{{=it.func.join(it.entity.defName,it.entity.comment,\';\')}}\';{{?}}\\n{{~it.entity.fields:field:index}}\\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS \'{{=it.func.join(field.defName,field.comment,\';\')}}\';{{?}}\\n{{~}}\", \"deleteIndex\": \"{{~ it.entity.indexes:index}}\\nDROP INDEX {{=index.defKey}} ;\\n{{~}}\", \"deleteTable\": \"DROP TABLE {{=it.entity.defKey}};\"}, {\"type\": \"dbDDL\", \"update\": \"{{\\n    let createEntities = it.changes.filter(function(row){return (row.opt===\'add\'&&row[\'type\']===\'entity\');});\\n    let dropEntities   = it.changes.filter(function(row){return (row.opt===\'delete\'&&row[\'type\']===\'entity\');});\\n    let modifyEntities = it.changes.filter(function(row){return (row.opt===\'update\'&&row[\'type\']===\'entity\');});\\n    \\n    function baseChangedDDL(beforeAfter){\\n        if(beforeAfter == null){\\n            return \'\';\\n        }\\n        let ret = [];\\n        let before = beforeAfter.before || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        let after = beforeAfter.after || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        if(before.defKey !== after.defKey){\\n            ret.push(`EXEC sp_rename \'${before.defKey}\',\'${after.defKey}\'`);\\n        }\\n        let commentText = \'\';\\n        let commentChanged = false;\\n        if(before.defName !== after.defName){\\n            commentText = after.defName;\\n            commentChanged = true;\\n        }\\n        if(before.comment !== after.comment){\\n            commentChanged = true;\\n            if(commentText){\\n                commentText = (commentText+ \';\'+after.comment)\\n            }else{\\n                commentText = after.comment\\n            }\\n        }\\n        if(commentChanged){\\n            let myText = `IF ((SELECT COUNT(*) FROM ::fn_listextendedproperty(\'MS_Description\',\'SCHEMA\', \'dbo\',\'TABLE\', \'${after.defKey}\', NULL, NULL)) > 0)\\n            \\\\n\\\\tEXEC sp_updateextendedproperty \'MS_Description\', \'${commentText}\',\'SCHEMA\', \'dbo\',\'TABLE\', \'${after.defKey}\'\\n            \\\\nELSE\\n            \\\\n\\\\tEXEC sp_addextendedproperty \'MS_Description\', \'${commentText}\', \'SCHEMA\', \'dbo\',\'TABLE\', \'${after.defKey}\'\\n            `;\\n            ret.push(myText);\\n            /*ret.push(\'ALTER TABLE \'+after.defKey+\' COMMENT \\\\\'\'+commentText+\'\\\\\'\');*/\\n        }\\n        let baseText = \'-- 基本信息:\\\\n\';\\n        return baseText+ret.join(\';\\\\n\')+\';\';\\n    };\\n    \\n    function buildAddedDDL(entity){\\n        let ret = [];\\n        let fieldAdded = entity.data.fieldAdded||[];\\n        if(fieldAdded.length == 0){\\n            return \'\';\\n        }\\n        \\n        let firstDDL = `ALTER TABLE [dbo].[${entity.data.baseInfo.defKey}]`;\\n        for (let field of fieldAdded) { \\n            let ddlItem = `ADD [${field.defKey}] ${field.dbType}`;\\n            /*处理数据类型长度*/\\n            if(field.len>0){\\n                ddlItem += (\'(\'+field.len);\\n                if(parseInt(field.scale)>0){\\n                    ddlItem += (\',\'+field.scale);\\n                }\\n                ddlItem += \')\';\\n            }\\n            let defaultValue = field.defaultValue;\\n            defaultValue = (defaultValue==null)?\\\"\\\":(\\\"\\\"+defaultValue);\\n            if(defaultValue.length>0){\\n                ddlItem += (\' DEFAULT \' + defaultValue);\\n            }\\n            if(field.notNull){\\n                ddlItem += \' NOT NULL\';\\n            }\\n            ret.push(`${firstDDL} ${ddlItem}`);\\n            \\n            /*处理字段注释*/\\n            let fieldComments = [];\\n            if(field.defName != null &&field.defName.length>0){\\n                fieldComments.push(field.defName);\\n            }\\n            if(field.comment != null &&field.comment.length>0){\\n                fieldComments.push(field.comment);\\n            }\\n            let commentText = fieldComments.join(\';\');\\n            if(commentText != null && commentText.length > 0){\\n                let commentDDL = `EXEC sp_addextendedproperty \'MS_Description\', N\'${commentText}\',\'SCHEMA\', N\'dbo\',\'TABLE\', N\'${entity.data.baseInfo.defKey}\',\'COLUMN\', N\'${field.defKey}\'`;\\n                ret.push(commentDDL);\\n            }\\n        }\\n        return \'\\\\n\'+ret.join(\';\\\\n\');\\n    };\\n    \\n    function buildRemovedDDL(entity){\\n        let ret = [];\\n        let fieldRemoved = entity.data.fieldRemoved||[];\\n        if(fieldRemoved.length == 0){\\n            return \'\';\\n        }\\n        \\n        let firstDDL = `ALTER TABLE [dbo].[${entity.data.baseInfo.defKey}]`;\\n        for (let field of fieldRemoved) { \\n            ret.push(`${firstDDL} DROP COLUMN [${field.defKey}]`);\\n        }\\n        return \'\\\\n\'+ret.join(\';\\\\n\');\\n    };\\n    \\n    function buildModifiedDDL(entity){\\n        let ret = [];\\n        let fieldModified = entity.data.fieldModified||[];\\n        \\n        let firstDDL = `ALTER TABLE [dbo].[${entity.data.baseInfo.defKey}]`;\\n        for (let field of fieldModified) { \\n            let changeDDL = \'\';\\n            let before = field.before || {};\\n            let after = field.after || {};\\n            if(before.defKey === after.defKey){\\n                changeDDL += (\' ALTER COLUMN [\'+after.defKey+\']\');\\n            }else{\\n                let renameText = `EXEC sp_rename \'[dbo].[${entity.data.baseInfo.defKey}].[${before.defKey}]\',\'${after.defKey}\',\'COLUMN\';`;\\n                ret.push(renameText);\\n                continue;\\n            }\\n            changeDDL += (\' \'+after.dbType);\\n            if(after.len>0){\\n                changeDDL += (\'(\'+after.len);\\n                if(parseInt(after.scale)>0){\\n                    changeDDL += (\',\'+after.scale);\\n                }\\n                changeDDL += \')\';\\n            }\\n            let defaultValue = after.defaultValue;\\n            defaultValue = (defaultValue==null)?\\\"\\\":(\\\"\\\"+defaultValue);\\n            if(defaultValue.length>0){\\n                changeDDL += (\' DEFAULT \' + defaultValue);\\n            }\\n            \\n            if(after.notNull){\\n                changeDDL += \' NOT NULL\';\\n            }\\n            ret.push(`${firstDDL} ${changeDDL};`);\\n        }\\n        return ret;\\n    };\\n}}\\n{{? createEntities && createEntities.length > 0}}\\n/* --------------- 创建表 --------------- */\\n{{~ createEntities:entity}}\\n{{=it.func.createDDL(entity.data,entity[\'type\'])}}\\n{{~}}\\n{{?}}\\n\\n\\n{{? dropEntities && dropEntities.length > 0}}\\n/* --------------- 删除表 --------------- */\\n{{~ dropEntities:entity}}\\n{{=it.func.dropDDL(entity.data,entity[\'type\'])}}\\n{{~}}\\n{{?}}\\n\\n\\n{{? modifyEntities && modifyEntities.length > 0}}\\n{{~ modifyEntities:entity}}\\n/* --------------- 修改表 --------------- */\\n-- 修改表：{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\\n{{=baseChangedDDL(entity.data.baseChanged)}}\\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\\n-- 修改字段：\\n{{=buildModifiedDDL(entity).join(\'\\\\n\')}}\\n{{?}}{{\\n/*索引是否修改过*/\\nlet indexChanged = entity.data.indexChanged;\\n}}\\n{{? indexChanged }}\\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity[\'type\'])}}\\n{{?}}\\n\\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\\n-- 添加字段：\\n{{=buildAddedDDL(entity)}};\\n{{?}}\\n\\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\\n-- 删除字段：\\n{{=buildRemovedDDL(entity)}};\\n{{?}}\\n{{~}}\\n{{?}}\", \"message\": \"{{\\n    let createEntities = it.changes.filter(function(row){return (row.opt===\'add\'&&row[\'type\']===\'entity\');});\\n    let dropEntities   = it.changes.filter(function(row){return (row.opt===\'delete\'&&row[\'type\']===\'entity\');});\\n    let modifyEntities = it.changes.filter(function(row){return (row.opt===\'update\'&&row[\'type\']===\'entity\');});\\n    \\n    function baseChanged(beforeAfter){\\n        if(beforeAfter == null){\\n            return \'\';\\n        }\\n        let ret = [];\\n        let before = beforeAfter.before || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        let after = beforeAfter.after || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        if(before.defKey !== after.defKey){\\n            ret.push(\'代码:\'+(before.defKey||\'NULL\')+\'->\'+(after.defKey||\'NULL\'));\\n        }\\n        if(before.defName !== after.defName){\\n            ret.push(\'显示名称:\'+(before.defName||\'NULL\')+\'->\'+(after.defName||\'NULL\'));\\n        }\\n        if(before.comment !== after.comment){\\n            ret.push(\'说明:\'+(before.comment||\'NULL\')+\'->\'+(after.comment||\'NULL\'));\\n        }\\n        if(ret.length>0){\\n            return \'    基本信息:\\\\n\\\\t\'+ret.join(\'\\\\n\\\\t\');\\n        }\\n        return \'\';\\n    };\\n    \\n    function buildAddedDesc(entity){\\n        let ret = [];\\n        let fieldAdded = entity.data.fieldAdded||[];\\n        \\n        for (let field of fieldAdded) { \\n            let row = [];\\n            row.push(field.defKey+\'[\'+field.defName+\']\');\\n            ret.push(row.join(\\\"\\\"))\\n        }\\n        return ret;\\n    };\\n    \\n    function buildRemovedDesc(entity){\\n        let ret = [];\\n        let fieldRemoved = entity.data.fieldRemoved||[];\\n        \\n        for (let field of fieldRemoved) { \\n            let row = [];\\n            row.push(field.defKey+\'[\'+field.defName+\']\');\\n            ret.push(row.join(\\\"\\\"))\\n        }\\n        return ret;\\n    };\\n    \\n    function buildModifiedDesc(entity){\\n        let ret = [];\\n        let fieldModified = entity.data.fieldModified||[];\\n        \\n        for (let field1 of fieldModified) { \\n            let row = [];\\n            let field = field1.before;\\n            row.push(field.defKey+\'[\'+field.defName+\']\');\\n            ret.push(row.join(\\\"\\\"))\\n        }\\n        return ret;\\n    };\\n}}\\n\\n\\n{{? createEntities && createEntities.length > 0}}\\n/* --------------- 创建表 --------------- */\\n{{~ createEntities:entity}}\\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\\n{{~}}\\n{{?}}\\n\\n\\n{{? dropEntities && dropEntities.length > 0}}\\n/* --------------- 删除表 --------------- */\\n{{~ dropEntities:entity}}\\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\\n{{~}}\\n{{?}}\\n\\n{{? modifyEntities && modifyEntities.length > 0}}\\n/* --------------- 修改表 --------------- */\\n{{~ modifyEntities:entity}}\\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\\n{{=baseChanged(entity.data.baseChanged)}}\\n    {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\\n    修改字段：\\n    {{=\'\\\\t\'}}{{=buildModifiedDesc(entity).join(\'\\\\n\\\\t\')}}{{?}}{{\\n        /*计算是否调整了属性*/\\n        let propAdded = entity.data.propAdded || [];\\n        let propRemoved = entity.data.propRemoved || [];\\n        let propModified = entity.data.propModified || [];\\n        let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\\n        /*计算关联是否调整*/\\n        let refEntityAdd = entity.data.refEntityAdd || [];\\n        let refEntityRemoved = entity.data.refEntityRemoved || [];\\n        let relaArray = [];\\n        for (let rela of refEntityAdd) {\\n            relaArray.push(\'建立关联:\'+rela.defKey+\'[\'+rela.defName+\']\');\\n        }\\n        for (let rela of refEntityRemoved) {\\n            relaArray.push(\'解除关联:\'+rela.defKey+\'[\'+rela.defName+\']\');\\n        }\\n        /*索引是否修改过*/\\n        let indexChanged = entity.data.indexChanged;\\n    }}{{=indexChanged?\'\\\\n\\\\t更改了索引\':\'\'}}{{=changed?\'\\\\n\\\\t更改了属性\':\'\'}}{{=relaArray.length>0?(\'\\\\n\\\\t\'+relaArray.join(\'\\\\n\\\\t\')):\'\'}}\\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\\n    添加字段：\\n{{=\'\\\\t\'}}{{=buildAddedDesc(entity).join(\'\\\\n\\\\t\')}}\\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\\n    删除字段：\\n{{=\'\\\\t\'}}{{=buildRemovedDesc(entity).join(\'\\\\n\\\\t\')}}\\n{{?}}\\n{{~}}\\n{{?}}\", \"applyFor\": \"BFC87171-C74F-494A-B7C2-76B9C55FACC9\", \"createView\": \"CREATE VIEW {{=it.view.defKey}} AS\\nSELECT \\n{{~it.view.fields:field:index}}\\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? \',\' : \'\'}}\\n{{~}}\\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? \',\' : \'\'}}{{~}};\\n$blankline\\n\", \"createIndex\": \"{{~ it.entity.indexes:index}}\\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,\',\')}});\\n{{~}}\", \"createTable\": \"IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N\'[dbo].[{{=it.entity.defKey}}]\') AND type in (N\'U\')) DROP TABLE [dbo].[{{=it.entity.defKey}}];\\n\\nCREATE TABLE [dbo].[{{=it.entity.defKey}}](\\n{{ pkList = [] ; }}\\n{{~it.entity.fields:field:index}}\\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{=\'(\'}}{{=field.len}}{{?field.scale>0}}{{=\',\'}}{{=field.scale}}{{?}}{{=\')\'}}{{?}}{{= field.notNull ? \' NOT NULL\' : \'\' }}{{= field.autoIncrement ? \' IDENTITY(1,1)\' : \'\' }}{{= field.defaultValue ? it.func.join(\' DEFAULT \',field.defaultValue,\' \') : \'\' }}{{= index < it.entity.fields.length-1 ? \',\' : ( pkList.length>0 ? \',\' :\'\' ) }}\\n{{~}}\\n{{? pkList.length >0 }}\\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? \',\' : \'\' }}{{~}})\\n{{?}}\\n);\\n$blankline\\n{{? it.entity.defKey || it.entity.defName}}EXEC sp_addextendedproperty \'MS_Description\', \'{{=it.func.join(it.entity.defName,it.entity.comment,\';\')}}\', \'SCHEMA\', dbo, \'table\', {{=it.entity.defKey}}, null, null;{{?}}\\n{{~it.entity.fields:field:index}}\\nEXEC sp_addextendedproperty \'MS_Description\', \'{{=it.func.join(field.defName,field.comment,\';\')}}\', \'SCHEMA\', dbo, \'table\', {{=it.entity.defKey}}, \'column\', {{=field.defKey}};\\n{{~}}\\n\", \"deleteIndex\": \"\", \"deleteTable\": \"IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N\'[dbo].[{{=it.entity.defKey}}]\') AND type in (N\'U\')) DROP TABLE [dbo].[{{=it.entity.defKey}}];\"}, {\"type\": \"dbDDL\", \"update\": \"{{\\n    let createEntities = it.changes.filter(function(row){return (row.opt===\'add\'&&row[\'type\']===\'entity\');});\\n    let dropEntities   = it.changes.filter(function(row){return (row.opt===\'delete\'&&row[\'type\']===\'entity\');});\\n    let modifyEntities = it.changes.filter(function(row){return (row.opt===\'update\'&&row[\'type\']===\'entity\');});\\n    \\n    function baseChangedDDL(beforeAfter){\\n        if(beforeAfter == null){\\n            return \'\';\\n        }\\n        let ret = [];\\n        let before = beforeAfter.before || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        let after = beforeAfter.after || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        if(before.defKey !== after.defKey){\\n            ret.push(`ALTER TABLE ${before.defKey} RENAME TO ${after.defKey}`);\\n        }\\n        let commentText = \'\';\\n        let commentChanged = false;\\n        if(before.defName !== after.defName){\\n            commentText = after.defName;\\n            commentChanged = true;\\n        }\\n        if(before.comment !== after.comment){\\n            commentChanged = true;\\n            if(commentText){\\n                commentText = (commentText+ \';\'+after.comment)\\n            }else{\\n                commentText = after.comment\\n            }\\n        }\\n        if(commentChanged){\\n            let myText = `COMMENT ON TABLE ${after.defKey} IS \'${commentText}\'`;\\n            ret.push(myText);\\n        }\\n        let baseText = \'-- 基本信息:\\\\n\';\\n        return baseText+ret.join(\';\\\\n\')+\';\';\\n    };\\n    \\n    function buildAddedDDL(entity){\\n        let ret = [];\\n        let fieldAdded = entity.data.fieldAdded||[];\\n        if(fieldAdded.length == 0){\\n            return \'\';\\n        }\\n        \\n        let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\\n        for (let field of fieldAdded) { \\n            let ddlItem = `ADD COLUMN ${field.defKey} ${field.dbType}`;\\n            /*处理数据类型长度*/\\n            if(field.len>0){\\n                ddlItem += (\'(\'+field.len);\\n                if(parseInt(field.scale)>0){\\n                    ddlItem += (\',\'+field.scale);\\n                }\\n                ddlItem += \')\';\\n            }\\n            if(field.notNull){\\n                ddlItem += \' NOT NULL\';\\n            }            \\n            let defaultValue = field.defaultValue;\\n            defaultValue = (defaultValue==null)?\\\"\\\":(\\\"\\\"+defaultValue);\\n            if(defaultValue.length>0){\\n                ddlItem += (\' DEFAULT \' + defaultValue);\\n            }\\n\\n            ret.push(`${firstDDL} ${ddlItem}`);\\n            \\n            /*处理字段注释*/\\n            let fieldComments = [];\\n            if(field.defName != null &&field.defName.length>0){\\n                fieldComments.push(field.defName);\\n            }\\n            if(field.comment != null &&field.comment.length>0){\\n                fieldComments.push(field.comment);\\n            }\\n            let commentText = fieldComments.join(\';\');\\n            if(commentText != null && commentText.length > 0){\\n                let commentDDL = `COMMENT ON COLUMN ${entity.data.baseInfo.defKey}.${field.defKey} IS \'${commentText}\'`;\\n                 ret.push(commentDDL);\\n            }\\n        }\\n        return \'\\\\n\'+ret.join(\';\\\\n\');\\n    };\\n    \\n    function buildRemovedDDL(entity){\\n        let ret = [];\\n        let fieldRemoved = entity.data.fieldRemoved||[];\\n        if(fieldRemoved.length == 0){\\n            return \'\';\\n        }\\n        \\n        let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\\n        for (let field of fieldRemoved) { \\n            ret.push(`${firstDDL} DROP COLUMN ${field.defKey}`);\\n        }\\n        return \'\\\\n\'+ret.join(\';\\\\n\');\\n    };\\n    \\n    function buildModifiedDDL(entity){\\n        let ret = [];\\n        let fieldModified = entity.data.fieldModified||[];\\n        \\n        let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\\n        for (let field of fieldModified) { \\n            let before = field.before || {};\\n            let after = field.after || {};\\n            if(before.defKey !== after.defKey){\\n                let renameText = `ALTER TABLE ${entity.data.baseInfo.defKey} RENAME COLUMN ${before.defKey} TO ${after.defKey};`;\\n                ret.push(renameText);\\n            }\\n            /*如果没有变化，则不生成变更语句*/\\n            if(before.dbType === after.dbType \\n            && before[\'len\'] === after[\'len\'] \\n            && before.scale === after.scale\\n            && before.primaryKey === after.primaryKey\\n            && before.notNull === after.notNull\\n            && before.autoIncrement === after.autoIncrement\\n            && before.defaultValue === after.defaultValue){\\n                continue;\\n            }\\n            if(before.dbType !== after.dbType || before.len !== after.len || before.scale !== after.scale){\\n                let dbTypeDDL = `ALTER TABLE ${entity.data.baseInfo.defKey} ALTER COLUMN ${after.defKey} TYPE ${before.dbType}`;\\n                if(after.len>0){\\n                    dbTypeDDL += (\'(\'+after.len);\\n                    if(parseInt(after.scale)>0){\\n                        dbTypeDDL += (\',\'+after.scale);\\n                    }\\n                    dbTypeDDL += \')\';\\n                }\\n                ret.push(dbTypeDDL+\';\');\\n            }\\n            \\n            if(before.defaultValue !== after.defaultValue){\\n                let defaultDDL = \'\';\\n                let defaultValue = after.defaultValue;\\n                defaultValue = (defaultValue==null)?\\\"NULL\\\":(\\\"\\\"+defaultValue);\\n                if(defaultValue.length>0){\\n                    defaultDDL += (\'SET DEFAULT \' + defaultValue);\\n                }\\n                let defaultTpl = `ALTER TABLE ${entity.data.baseInfo.defKey} ALTER COLUMN ${defaultDDL};`;\\n                ret.push(defaultTpl);\\n            }\\n            \\n            if(before.notNull !== after.notNull){\\n                let notNullDDL= \'SET NULL\';\\n                if(after.notNull){\\n                    let notNullDDL= \'SET NOT NULL\';\\n                }\\n                let notNullTpl = `ALTER TABLE ${entity.data.baseInfo.defKey} ALTER COLUMN ${notNullDDL};`;\\n                ret.push(notNullTpl);\\n            }\\n        }\\n        return ret;\\n    };\\n}}\\n{{? createEntities && createEntities.length > 0}}\\n/* --------------- 创建表 --------------- */\\n{{~ createEntities:entity}}\\n{{=it.func.createDDL(entity.data,entity[\'type\'])}}\\n{{~}}\\n{{?}}\\n\\n\\n{{? dropEntities && dropEntities.length > 0}}\\n/* --------------- 删除表 --------------- */\\n{{~ dropEntities:entity}}\\n{{=it.func.dropDDL(entity.data,entity[\'type\'])}}\\n{{~}}\\n{{?}}\\n\\n\\n{{? modifyEntities && modifyEntities.length > 0}}\\n{{~ modifyEntities:entity}}\\n/* --------------- 修改表 --------------- */\\n-- 修改表：{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\\n{{=baseChangedDDL(entity.data.baseChanged)}}\\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\\n-- 修改字段：\\n{{=buildModifiedDDL(entity).join(\'\\\\n\')}}\\n{{?}}{{\\n/*索引是否修改过*/\\nlet indexChanged = entity.data.indexChanged;\\n}}\\n{{? indexChanged }}\\n-- 索引重建\\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity[\'type\'])}}\\n{{?}}\\n\\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\\n-- 添加字段：\\n{{=buildAddedDDL(entity)}};\\n{{?}}\\n\\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\\n-- 删除字段：\\n{{=buildRemovedDDL(entity)}};\\n{{?}}\\n{{~}}\\n{{?}}\", \"message\": \"{{\\n    let createEntities = it.changes.filter(function(row){return (row.opt===\'add\'&&row[\'type\']===\'entity\');});\\n    let dropEntities   = it.changes.filter(function(row){return (row.opt===\'delete\'&&row[\'type\']===\'entity\');});\\n    let modifyEntities = it.changes.filter(function(row){return (row.opt===\'update\'&&row[\'type\']===\'entity\');});\\n    \\n    function baseChanged(beforeAfter){\\n        if(beforeAfter == null){\\n            return \'\';\\n        }\\n        let ret = [];\\n        let before = beforeAfter.before || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        let after = beforeAfter.after || {\\\"defKey\\\":\\\"\\\",\\\"defName\\\":\\\"\\\",\\\"comment\\\":\\\"\\\"};\\n        if(before.defKey !== after.defKey){\\n            ret.push(\'代码:\'+(before.defKey||\'NULL\')+\'->\'+(after.defKey||\'NULL\'));\\n        }\\n        if(before.defName !== after.defName){\\n            ret.push(\'显示名称:\'+(before.defName||\'NULL\')+\'->\'+(after.defName||\'NULL\'));\\n        }\\n        if(before.comment !== after.comment){\\n            ret.push(\'说明:\'+(before.comment||\'NULL\')+\'->\'+(after.comment||\'NULL\'));\\n        }\\n        if(ret.length>0){\\n            return \'    基本信息:\\\\n\\\\t\'+ret.join(\'\\\\n\\\\t\');\\n        }\\n        return \'\';\\n    };\\n    \\n    function buildAddedDesc(entity){\\n        let ret = [];\\n        let fieldAdded = entity.data.fieldAdded||[];\\n        \\n        for (let field of fieldAdded) { \\n            let row = [];\\n            row.push(field.defKey+\'[\'+field.defName+\']\');\\n            ret.push(row.join(\\\"\\\"))\\n        }\\n        return ret;\\n    };\\n    \\n    function buildRemovedDesc(entity){\\n        let ret = [];\\n        let fieldRemoved = entity.data.fieldRemoved||[];\\n        \\n        for (let field of fieldRemoved) { \\n            let row = [];\\n            row.push(field.defKey+\'[\'+field.defName+\']\');\\n            ret.push(row.join(\\\"\\\"))\\n        }\\n        return ret;\\n    };\\n    \\n    function buildModifiedDesc(entity){\\n        let ret = [];\\n        let fieldModified = entity.data.fieldModified||[];\\n        \\n        for (let field1 of fieldModified) { \\n            let row = [];\\n            let field = field1.before;\\n            row.push(field.defKey+\'[\'+field.defName+\']\');\\n            ret.push(row.join(\\\"\\\"))\\n        }\\n        return ret;\\n    };\\n}}\\n\\n\\n{{? createEntities && createEntities.length > 0}}\\n/* --------------- 创建表 --------------- */\\n{{~ createEntities:entity}}\\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\\n{{~}}\\n{{?}}\\n\\n\\n{{? dropEntities && dropEntities.length > 0}}\\n/* --------------- 删除表 --------------- */\\n{{~ dropEntities:entity}}\\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\\n{{~}}\\n{{?}}\\n\\n{{? modifyEntities && modifyEntities.length > 0}}\\n/* --------------- 修改表 --------------- */\\n{{~ modifyEntities:entity}}\\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\\n{{=baseChanged(entity.data.baseChanged)}}\\n    {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\\n    修改字段：\\n    {{=\'\\\\t\'}}{{=buildModifiedDesc(entity).join(\'\\\\n\\\\t\')}}{{?}}{{\\n        /*计算是否调整了属性*/\\n        let propAdded = entity.data.propAdded || [];\\n        let propRemoved = entity.data.propRemoved || [];\\n        let propModified = entity.data.propModified || [];\\n        let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\\n        /*计算关联是否调整*/\\n        let refEntityAdd = entity.data.refEntityAdd || [];\\n        let refEntityRemoved = entity.data.refEntityRemoved || [];\\n        let relaArray = [];\\n        for (let rela of refEntityAdd) {\\n            relaArray.push(\'建立关联:\'+rela.defKey+\'[\'+rela.defName+\']\');\\n        }\\n        for (let rela of refEntityRemoved) {\\n            relaArray.push(\'解除关联:\'+rela.defKey+\'[\'+rela.defName+\']\');\\n        }\\n        /*索引是否修改过*/\\n        let indexChanged = entity.data.indexChanged;\\n    }}{{=indexChanged?\'\\\\n\\\\t更改了索引\':\'\'}}{{=changed?\'\\\\n\\\\t更改了属性\':\'\'}}{{=relaArray.length>0?(\'\\\\n\\\\t\'+relaArray.join(\'\\\\n\\\\t\')):\'\'}}\\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\\n    添加字段：\\n{{=\'\\\\t\'}}{{=buildAddedDesc(entity).join(\'\\\\n\\\\t\')}}\\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\\n    删除字段：\\n{{=\'\\\\t\'}}{{=buildRemovedDesc(entity).join(\'\\\\n\\\\t\')}}\\n{{?}}\\n{{~}}\\n{{?}}\", \"applyFor\": \"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022\", \"createView\": \"CREATE VIEW {{=it.view.defKey}} AS\\nSELECT \\n{{~it.view.fields:field:index}}\\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? \',\' : \'\'}}\\n{{~}}\\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? \',\' : \'\'}}{{~}};\\n$blankline\\n\", \"createIndex\": \"{{~ it.entity.indexes:index}}\\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,\',\')}});\\n{{~}}\", \"createTable\": \"DROP TABLE IF EXISTS {{=it.entity.defKey}};\\nCREATE TABLE {{=it.entity.defKey}}(\\n{{ pkList = [] ; }}\\n{{~it.entity.fields:field:index}}\\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\\n    {{=field.defKey}} {{? field.autoIncrement}}SERIAL{{??}}{{=field.type}}{{?field.len>0}}{{=\'(\'}}{{=field.len}}{{?field.scale>0}}{{=\',\'}}{{=field.scale}}{{?}}{{=\')\'}}{{?}}{{?}}{{= field.notNull ? \' NOT NULL\' : \'\' }}{{= field.defaultValue ? it.func.join(\' DEFAULT \',field.defaultValue,\' \') : \'\' }}{{= index < it.entity.fields.length-1 ? \',\' : ( pkList.length>0 ? \',\' :\'\' ) }}\\n{{~}}\\n{{? pkList.length >0 }}\\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? \',\' : \'\' }}{{~}})\\n{{?}}\\n);\\n$blankline\\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS \'{{=it.func.join(it.entity.defName,it.entity.comment,\';\')}}\';{{?}}\\n{{~it.entity.fields:field:index}}\\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS \'{{=it.func.join(field.defName,field.comment,\';\')}}\';{{?}}\\n{{~}}\", \"deleteIndex\": \"{{~ it.entity.indexes:index}}\\nDROP INDEX {{=index.defKey}} ;\\n{{~}}\", \"deleteTable\": \"DROP TABLE IF EXISTS {{=it.entity.defKey}};\"}, {\"type\": \"dbDDL\", \"applyFor\": \"89504F5D-94BF-4C9E-8B2E-44F37305FED5\", \"createView\": \"CREATE VIEW {{=it.view.defKey}} AS\\nSELECT \\n{{~it.view.fields:field:index}}\\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? \',\' : \'\'}}\\n{{~}}\\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? \',\' : \'\'}}{{~}};\\n$blankline\\n\", \"createIndex\": \"{{~ it.entity.indexes:index}}\\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,\',\')}});\\n{{~}}\", \"createTable\": \"CREATE TABLE {{=it.entity.defKey}}(\\n{{ pkList = [] ; }}\\n{{~it.entity.fields:field:index}}\\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{=\'(\'}}{{=field.len}}{{?field.scale>0}}{{=\',\'}}{{=field.scale}}{{?}}{{=\')\'}}{{?}}{{= field.notNull ? \' NOT NULL\' : \'\' }}{{= field.autoIncrement ? \'\' : \'\' }}{{= field.defaultValue ? it.func.join(\' DEFAULT \',field.defaultValue,\' \') : \'\' }}{{= index < it.entity.fields.length-1 ? \',\' : ( pkList.length>0 ? \',\' :\'\' ) }}\\n{{~}}\\n{{? pkList.length >0 }}\\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? \',\' : \'\' }}{{~}})\\n{{?}}\\n);\\n$blankline\\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS \'{{=it.func.join(it.entity.defName,it.entity.comment,\';\')}}\';{{?}}\\n{{~it.entity.fields:field:index}}\\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS \'{{=it.func.join(field.defName,field.comment,\';\')}}\';{{?}}\\n{{~}}\"}, {\"type\": \"dbDDL\", \"applyFor\": \"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307\", \"createView\": \"CREATE VIEW {{=it.view.defKey}} AS\\nSELECT \\n{{~it.view.fields:field:index}}\\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? \',\' : \'\'}}\\n{{~}}\\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? \',\' : \'\'}}{{~}};\\n$blankline\\n\", \"createIndex\": \"{{~ it.entity.indexes:index}}\\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,\',\')}});\\n{{~}}\", \"createTable\": \"CREATE TABLE {{=it.entity.defKey}}(\\n{{ pkList = [] ; }}\\n{{~it.entity.fields:field:index}}\\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{=\'(\'}}{{=field.len}}{{?field.scale>0}}{{=\',\'}}{{=field.scale}}{{?}}{{=\')\'}}{{?}}{{= field.notNull ? \' NOT NULL\' : \'\' }}{{= field.autoIncrement ? \'\' : \'\' }}{{= field.defaultValue ? it.func.join(\' DEFAULT \',\'(\'+field.defaultValue+\')\',\' \') : \'\' }}{{= index < it.entity.fields.length-1 ? \',\' : ( pkList.length>0 ? \',\' :\'\' ) }}\\n{{~}}\\n{{? pkList.length >0 }}\\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? \',\' : \'\' }}{{~}})\\n{{?}}\\n);\\n$blankline\\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS \'{{=it.func.join(it.entity.defName,it.entity.comment,\';\')}}\';{{?}}\\n{{~it.entity.fields:field:index}}\\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS \'{{=it.func.join(field.defName,field.comment,\';\')}}\';{{?}}\\n{{~}}\"}, {\"type\": \"dbDDL\", \"applyFor\": \"592C7013-143D-4E7B-AF64-0D7BF1E28230\", \"createView\": \"CREATE VIEW {{=it.view.defKey}} AS\\nSELECT \\n{{~it.view.fields:field:index}}\\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? \',\' : \'\'}}\\n{{~}}\\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? \',\' : \'\'}}{{~}};\\n$blankline\\n\", \"createIndex\": \"{{~ it.entity.indexes:index}}\\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,\',\')}});\\n{{~}}\", \"createTable\": \"DROP TABLE IF EXISTS {{=it.entity.defKey}};\\nCREATE TABLE {{=it.entity.defKey}}(\\n{{ pkList = [] ; }}\\n{{~it.entity.fields:field:index}}\\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{=\'(\'}}{{=field.len}}{{?field.scale>0}}{{=\',\'}}{{=field.scale}}{{?}}{{=\')\'}}{{?}}{{= field.notNull ? \' NOT NULL\' : \'\' }}{{= field.autoIncrement ? \' AUTO_INCREMENT\' : \'\' }}{{= field.defaultValue ? it.func.join(\' DEFAULT \',field.defaultValue,\' \') : \'\' }}{{= index < it.entity.fields.length-1 ? \',\' : ( pkList.length>0 ? \',\' :\'\' ) }}\\n{{~}}\\n{{? pkList.length >0 }}\\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? \',\' : \'\' }}{{~}})\\n{{?}}\\n);\\n$blankline\\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS \'{{=it.func.join(it.entity.defName,it.entity.comment,\';\')}}\';{{?}}\\n{{~it.entity.fields:field:index}}\\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS \'{{=it.func.join(field.defName,field.comment,\';\')}}\';{{?}}\\n{{~}}\"}, {\"type\": \"dbDDL\", \"applyFor\": \"77BD85E5-9D0D-4096-8427-CBA306FC9C6A\", \"createView\": \"CREATE VIEW {{=it.view.defKey}} AS\\nSELECT \\n{{~it.view.fields:field:index}}\\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? \',\' : \'\'}}\\n{{~}}\\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? \',\' : \'\'}}{{~}};\\n$blankline\\n\", \"createIndex\": \"{{~ it.entity.indexes:index}}\\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,\',\')}});\\n{{~}}\", \"createTable\": \"DROP TABLE IF EXISTS {{=it.entity.defKey}};\\nCREATE TABLE {{=it.entity.defKey}}(\\n{{ pkList = [] ; }}\\n{{~it.entity.fields:field:index}}\\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{=\'(\'}}{{=field.len}}{{?field.scale>0}}{{=\',\'}}{{=field.scale}}{{?}}{{=\')\'}}{{= field.defaultValue ? it.func.join(\' DEFAULT \',field.defaultValue,\' \') : \'\' }}{{?}}{{= field.notNull ? \' NOT NULL\' : \'\' }}{{= index < it.entity.fields.length-1 ? \',\' : ( pkList.length>0 ? \',\' :\'\' ) }}\\n{{~}}\\n{{? pkList.length >0 }}\\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? \',\' : \'\' }}{{~}})\\n{{?}}\\n);\\n$blankline\\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS \'{{=it.func.join(it.entity.defName,it.entity.comment,\';\')}}\';{{?}}\\n{{~it.entity.fields:field:index}}\\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS \'{{=it.func.join(field.defName,field.comment,\';\')}}\';{{?}}\\n{{~}}\"}, {\"type\": \"dbDDL\", \"update\": \"\", \"message\": \"\", \"applyFor\": \"11D1FB71-A587-4217-89BA-611B8A1F83E0\", \"createView\": \"CREATE VIEW {{=it.view.defKey}} AS\\nSELECT \\n{{~it.view.fields:field:index}}\\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? \',\' : \'\'}}\\n{{~}}\\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? \',\' : \'\'}}{{~}};\\n$blankline\\n\", \"createIndex\": \"\", \"createTable\": \"DROP TABLE IF EXISTS {{=it.entity.defKey}};\\nCREATE TABLE {{=it.entity.defKey}}(\\n{{ pkList = [] ; }}\\n{{~it.entity.fields:field:index}}\\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\\n    {{=field.defKey}} {{=field.type}} {{= field.notNull ? \'NOT NULL\' : \'\' }} {{= field.autoIncrement ? \'AUTO_INCREMENT\' : \'\' }} {{= field.defaultValue ? it.func.join(\'DEFAULT\',field.defaultValue,\' \') : \'\' }} COMMENT \'{{=it.func.join(field.defName,field.comment,\';\')}}\' {{= index < it.entity.fields.length-1 ? \',\' : ( pkList.length>0 ? \',\' :\'\' ) }}\\n{{~}}\\n{{? pkList.length >0 }}\\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? \',\' : \'\' }}{{~}})\\n{{?}}\\n)  COMMENT \'{{=it.func.join(it.entity.defName,it.entity.comment,\';\') }}\';\\n$blankline\\n\", \"deleteIndex\": \"\", \"deleteTable\": \"\"}, {\"type\": \"dbDDL\", \"applyFor\": \"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1\", \"createView\": \"CREATE VIEW {{=it.view.defKey}} AS\\nSELECT \\n{{~it.view.fields:field:index}}\\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? \',\' : \'\'}}\\n{{~}}\\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? \',\' : \'\'}}{{~}};\\n$blankline\\n\", \"createIndex\": \"{{~ it.entity.indexes:index}}\\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,\',\')}});\\n{{~}}\", \"createTable\": \"DROP TABLE IF EXISTS {{=it.entity.defKey}};\\nCREATE TABLE {{=it.entity.defKey}}(\\n{{ pkList = [] ; }}\\n{{~it.entity.fields:field:index}}\\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{=\'(\'}}{{=field.len}}{{?field.scale>0}}{{=\',\'}}{{=field.scale}}{{?}}{{=\')\'}}{{?}} {{= field.notNull ? \'NOT NULL\' : \'\' }} {{= field.autoIncrement ? \'AUTOINCREMENT\' : \'\' }} {{= field.defaultValue ? it.func.join(\'DEFAULT\',field.defaultValue,\' \') : \'\' }}{{= index < it.entity.fields.length-1 ? \',\' : ( pkList.length>0 ? \',\' :\'\' ) }} --{{=it.func.join(field.defName,field.comment,\';\')}}\\n{{~}}\\n{{? pkList.length >0 }}\\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? \',\' : \'\' }}{{~}})\\n{{?}}\\n)  ; --{{=it.func.join(it.entity.defName,it.entity.comment,\';\') }}\\n$blankline\\n\"}, {\"type\": \"dbDDL\", \"content\": \"/* 插入字典总表[{{=it.dict.defKey}}-{{=it.dict.defName}}] */\\nINSERT INTO SYS_DICT(KEY_,LABEL,INTRO,REVISION) VALUES(\'{{=it.dict.defKey}}\',\'{{=it.dict.defName}}\',\'{{=it.dict.intro}}\',1);\\n/* 插入字典明细表 */\\n{{~it.dict.items:item:index}}\\nINSERT INTO SYS_DICT_ITEM(DICT_KEY,KEY_,LABEL,SORT_,INTRO,REVISION) VALUES(\'{{=it.dict.defKey}}\',\'{{=item.defKey}}\',\'{{=item.defName}}\',\'{{=item.sort}}\',\'{{=item.intro}}\',1);\\n{{~}}\", \"applyFor\": \"dictSQLTemplate\"}, {\"type\": \"dbDDL\", \"update\": \"\", \"message\": \"\", \"applyFor\": \"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2\", \"createView\": \"\", \"createIndex\": \"\", \"createTable\": \"/**字段名,关键字等全部用的小写*/\\ndrop table if exists {{=it.entity.defKey}};\\n/**补充上库名,external关键字根据建表规范看是否添加*/\\ncreate [external] table if not exists {{=it.entity.defKey}}(\\n{{ pkList = [] ; }}\\n/**这里把varchar,char,text,date,datetime字段全部映射为string类型.tinyint unsigned,bit,Integer,tinyint,smallint,mediumint映射为int类型,int unsigned映射为bigint.其它自定义映射规则根据自己情况修改*/\\n/**当长度>0只有为decimal类型或double类型时才保留长度和小数的位数*/\\n{{~it.entity.fields:field:index}}\\n    {{=it.func.lowerCase(field.defKey)}} {{=it.func.lowerCase(field.dbType)==\'varchar\'||it.func.lowerCase(field.dbType)==\'char\'||it.func.lowerCase(field.dbType)==\'text\'||it.func.lowerCase(field.dbType)==\'date\'||it.func.lowerCase(field.dbType)==\'datetime\' ? \'string\':it.func.lowerCase(field.dbType)==\'tinyint unsigned\'||it.func.lowerCase(field.dbType)==\'bit\'||it.func.lowerCase(field.dbType)==\'integer\'||it.func.lowerCase(field.dbType)==\'tinyint\'||it.func.lowerCase(field.dbType)==\'smallint\'||it.func.lowerCase(field.dbType)==\'mediumint\' ? \'int\':it.func.lowerCase(field.dbType)==\'int unsigned\' ? \'bigint\':it.func.lowerCase(field.dbType)}}{{?field.len>0&&(it.func.lowerCase(field.dbType)==\'decimal\'||it.func.lowerCase(field.dbType)==\'double\')}}{{=\'(\'}}{{=field.len}}{{?field.scale>0}}{{=\',\'}}{{=field.scale}}{{=\')\'}}{{?}}{{?}} comment \'{{=it.func.join(field.defName,field.comment,\'\')}}\' {{= index < it.entity.fields.length-1 ? \',\' : ( pkList.length>0 ? \',\' :\'\' ) }}\\n{{~}}\\n{{? pkList.length >0 }}\\n{{?}}\\n)\\n{{\\n    let partitionedBy = it.entity.properties[\'partitioned by\'];\\n    partitionedBy = partitionedBy?partitionedBy:\'请在扩展属性中配置[partitioned by]属性\';\\n}}\\ncomment \'{{=it.func.join(it.entity.defName,\';\') }}\'\\n/**是否分区表,分区字段名和字段注释自定义*/\\n[partitioned by {{=partitionedBy}}]\\n/**文件存储格式自定义*/\\n[stored as orc]\\n/**hdfs上的地址自定义*/\\n[location xxx]\\n;\", \"deleteIndex\": \"\", \"deleteTable\": \"\"}, {\"type\": \"appCode\", \"content\": \"{{\\n    var today=new Date();\\n    var fullYear=today.getFullYear();\\n    var month=today.getMonth() + 1<10?\\\"0\\\"+today.getMonth():today.getMonth();\\n    var days=today.getDate()<10?\\\"0\\\"+today.getDate():today.getDate();\\n    var hours = today.getHours()<10?\\\"0\\\"+today.getHours():today.getHours();         \\n\\tvar minutes = today.getMinutes()<10?\\\"0\\\"+today.getMinutes():today.getMinutes();      \\n\\tvar seconds = today.getSeconds()<10?\\\"0\\\"+today.getSeconds():today.getSeconds();    \\n}}\\n// Package models  {{=it.func.join(it.entity.defName,it.entity.comment,\'，\')}}\\n// author : http://www.liyang.love\\n// date : {{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\\n// desc : {{=it.func.join(it.entity.defName,it.entity.comment,\'，\')}}\\npackage models\\n\\n$blankline\\n\\n// {{=it.func.camel(it.entity.defKey,true) }}  {{=it.func.join(it.entity.defName,it.entity.comment,\'，\')}}。\\n// 说明:{{=it.entity.comment}}\\n// 表名:{{=it.entity.defKey}}\\n// group: {{=it.func.camel(it.entity.defKey,true) }}\\n// obsolete:\\n// appliesto:go 1.8+;\\n// namespace:hongmouer.his.models.{{=it.func.camel(it.entity.defKey,true) }}\\n// assembly: hongmouer.his.models.go\\n// class:HongMouer.HIS.Models.{{=it.func.camel(it.entity.defKey,true) }}\\n// version:{{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\\ntype {{=it.func.camel(it.entity.defKey,true) }} struct {\\n    {{~it.entity.fields:field:index}}\\n    {{=formatGoLang(it.func.camel(field.defKey,true),null,field,it.entity.fields,null,1)}} {{=formatGoLang(field.type,\\\"type\\\",field,it.entity.fields,10,3)}}  `gorm:\\\"column:{{=field.primaryKey?\\\"primaryKey;\\\":\\\"\\\"}}{{=field.defKey}}\\\" json:\\\"{{=it.func.camel(field.defKey,true)}}\\\"` {{=formatGoLang(\\\"gorm:column:\\\"+field.defKey+\\\" json:\\\"+it.func.camel(field.defKey,true),null,field,it.entity.fields,null,2)}}  //type:{{=formatGoLang(field.type,\\\"type\\\",field,it.entity.fields,null,3)}}  comment:{{=formatGoLang(it.func.join(field.defName,field.comment,\';\'),\\\"defName\\\",field,it.entity.fields,null,4)}}  version:{{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\\n    {{~}}\\n}\\n\\n\\n$blankline\\n// TableName 表名:{{=it.entity.defKey}}，{{=it.entity.defName}}。\\n// 说明:{{=it.entity.comment}}\\nfunc (ZentaoUserInfo) TableName() string {\\n\\treturn \\\"{{=it.entity.defKey}}\\\"\\n}\\n\\n{{\\n\\nfunction formatGoLang(str, fieldName, field, fileds, emptLength, isFiled) {\\n    var maxLength = 0;\\n\\n    if (isFiled == 1) {\\n        for (var i = 0; i < fileds.length; i++) {\\n            if (getBlength(it.func.camel(fileds[i].defKey, true)) > maxLength) {\\n                maxLength = getBlength(it.func.camel(fileds[i].defKey, true)) + 2;\\n            }\\n        }\\n    } else if (isFiled == 2) {\\n        for (var i = 0; i < fileds.length; i++) {\\n            var newStr = \\\"gorm:column:\\\" + fileds[i].defKey + \\\" json:\\\" + it.func.camel(fileds[i].defKey, true);\\n            if (getBlength(newStr) > maxLength) {\\n                maxLength = getBlength(newStr) + 2;\\n            }\\n        }\\n        var empt = \\\"\\\";\\n        var strLength = getBlength(str);\\n        if (field.primaryKey) {\\n            strLength += getBlength(\\\"primaryKey;\\\");\\n        }\\n        for (var j = 0; j < maxLength - strLength; j++) {\\n            empt += \' \';\\n        }\\n        return empt;\\n    } else if (isFiled == 3) {\\n        /*获取某个字段的最大长度*/\\n        for (var i = 0; i < fileds.length; i++) {\\n            var newStr = eval(\\\"fileds[\\\" + i + \\\"].\\\" + fieldName);\\n            if (getBlength(newStr) > maxLength) {\\n                maxLength = getBlength(newStr) + 1;\\n            }\\n        }\\n    } else if (isFiled == 4) {\\n        /*获取某个字段的最大长度*/\\n        for (var i = 0; i < fileds.length; i++) {\\n            var newStr = fileds[i].comment + \\\";\\\" + fileds[i].defName;\\n            if (getBlength(newStr) > maxLength) {\\n                maxLength = getBlength(newStr) + 1;\\n            }\\n        }\\n    }\\n    else {\\n        maxLength = emptLength;\\n    }\\n\\n    var strLength = getBlength(str);\\n    for (var j = 0; j < maxLength - strLength; j++) {\\n        str += \' \';\\n    }\\n    return str;\\n}\\n\\nfunction getBlength(str) {\\n    var n = 0;\\n    for (var i = str.length; i--;) {\\n        n += str.charCodeAt(i) > 255 ? 2 : 1;\\n    }\\n    return n;\\n} \\n\\n}}\", \"applyFor\": \"B91D99E0-9B7C-416C-8737-B760957DAF09\"}]', NULL, 15, NULL, '[{\"freeze\": null, \"refKey\": \"defKey\", \"hideInGraph\": false}, {\"freeze\": null, \"refKey\": \"defName\", \"hideInGraph\": false}, {\"freeze\": null, \"refKey\": \"primaryKey\", \"hideInGraph\": false}, {\"freeze\": null, \"refKey\": \"notNull\", \"hideInGraph\": true}, {\"freeze\": null, \"refKey\": \"autoIncrement\", \"hideInGraph\": true}, {\"freeze\": null, \"refKey\": \"domain\", \"hideInGraph\": true}, {\"freeze\": null, \"refKey\": \"type\", \"hideInGraph\": false}, {\"freeze\": null, \"refKey\": \"len\", \"hideInGraph\": false}, {\"freeze\": null, \"refKey\": \"scale\", \"hideInGraph\": false}, {\"freeze\": null, \"refKey\": \"comment\", \"hideInGraph\": true}, {\"freeze\": null, \"refKey\": \"refDict\", \"hideInGraph\": true}, {\"freeze\": null, \"refKey\": \"defaultValue\", \"hideInGraph\": true}, {\"freeze\": null, \"refKey\": \"isStandard\", \"hideInGraph\": false}, {\"freeze\": null, \"refKey\": \"uiHint\", \"hideInGraph\": true}, {\"freeze\": null, \"refKey\": \"extProps\", \"hideInGraph\": true}]', ';', '{}', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00', NULL, NULL);

INSERT INTO `pdmaas`.`core_dict` (`SERIAL_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764871721164801', 'BF9E20E0-80D3-486D-BD58-5FADCF3E4A1D', '10', 'Gender', '性别', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict` (`SERIAL_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764872203509761', '06EED564-BBA9-4747-8D73-AF809A330CB8', '10', 'Political', '政治面貌', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict` (`SERIAL_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764872845238273', 'EA1587B7-3954-437A-BFE0-FCB0453BCABA', '10', 'Marital', '婚姻状况', '婚姻状况的码表', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict` (`SERIAL_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875273740290', '4642BC5F-02EE-4E17-A60C-CF22F86A0282', '10', 'StudentStatus', '学生状态', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict` (`SERIAL_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875810611202', '115EDEFC-0323-410E-81AB-CCAB8879837A', '10', 'GBNation', '民族', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict` (`SERIAL_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764876905324546', '9E7C9788-B805-4C7D-8531-FD1D9DC79B05', '10', 'GradeLevel', '受教育程度', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');


INSERT INTO `pdmaas`.`core_data_type` (`SERIAL_ID`, `DATA_TYPE_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `TYPE_MAPPING`, `OFFICIAL_LOCK`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877215703041', 'FC9790A7-36B8-4A48-8F9A-BC1042BCFE64', '10', 'string', '字串', '{\"id\": \"FC9790A7-36B8-4A48-8F9A-BC1042BCFE64\", \"defKey\": \"string\", \"defName\": \"字串\", \"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307\": \"VARCHAR2\", \"11D1FB71-A587-4217-89BA-611B8A1F83E0\": \"STRING\", \"29D1CE08-4C35-4D2D-AAA9-23D93305B52E\": \"VARCHAR\", \"592C7013-143D-4E7B-AF64-0D7BF1E28230\": \"VARCHAR\", \"77BD85E5-9D0D-4096-8427-CBA306FC9C6A\": \"VARCHAR\", \"797A1496-D649-4261-89B4-544132EC3F36\": \"String\", \"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2\": \"string\", \"89504F5D-94BF-4C9E-8B2E-44F37305FED5\": \"VARCHAR\", \"895CFD1D-4273-4D32-A2C4-CAC70200AB5B\": \"String\", \"A2EE7B4A-CE62-4290-B00C-B26C1BF18073\": \"String\", \"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542\": \"VARCHAR2\", \"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1\": \"TEXT\", \"B91D99E0-9B7C-416C-8737-B760957DAF09\": \"string\", \"BFC87171-C74F-494A-B7C2-76B9C55FACC9\": \"VARCHAR\", \"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022\": \"VARCHAR\", \"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30\": \"string\"}', NULL, NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_data_type` (`SERIAL_ID`, `DATA_TYPE_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `TYPE_MAPPING`, `OFFICIAL_LOCK`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877215703042', '1A0BDC09-0792-4174-9E8E-80BE8DF44B8E', '10', 'double', '小数', '{\"id\": \"1A0BDC09-0792-4174-9E8E-80BE8DF44B8E\", \"defKey\": \"double\", \"defName\": \"小数\", \"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307\": \"DECIMAL\", \"11D1FB71-A587-4217-89BA-611B8A1F83E0\": \"DOUBLE\", \"29D1CE08-4C35-4D2D-AAA9-23D93305B52E\": \"DECIMAL\", \"592C7013-143D-4E7B-AF64-0D7BF1E28230\": \"NUMERIC\", \"77BD85E5-9D0D-4096-8427-CBA306FC9C6A\": \"NUMERIC\", \"797A1496-D649-4261-89B4-544132EC3F36\": \"Double\", \"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2\": \"double\", \"89504F5D-94BF-4C9E-8B2E-44F37305FED5\": \"DECIMAL\", \"895CFD1D-4273-4D32-A2C4-CAC70200AB5B\": \"Double\", \"A2EE7B4A-CE62-4290-B00C-B26C1BF18073\": \"Double\", \"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542\": \"DECIMAL\", \"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1\": \"REAL\", \"B91D99E0-9B7C-416C-8737-B760957DAF09\": \"*float64\", \"BFC87171-C74F-494A-B7C2-76B9C55FACC9\": \"DECIMAL\", \"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022\": \"NUMERIC\", \"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30\": \"decimal\"}', NULL, NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_data_type` (`SERIAL_ID`, `DATA_TYPE_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `TYPE_MAPPING`, `OFFICIAL_LOCK`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877215703043', '1D764C4A-6F9F-421E-B11A-6F3E23B51811', '10', 'int', '整数', '{\"id\": \"1D764C4A-6F9F-421E-B11A-6F3E23B51811\", \"defKey\": \"int\", \"defName\": \"整数\", \"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307\": \"INTEGER\", \"11D1FB71-A587-4217-89BA-611B8A1F83E0\": \"INT\", \"29D1CE08-4C35-4D2D-AAA9-23D93305B52E\": \"INT\", \"592C7013-143D-4E7B-AF64-0D7BF1E28230\": \"INTEGER\", \"77BD85E5-9D0D-4096-8427-CBA306FC9C6A\": \"INT4\", \"797A1496-D649-4261-89B4-544132EC3F36\": \"Integer\", \"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2\": \"int\", \"89504F5D-94BF-4C9E-8B2E-44F37305FED5\": \"INT\", \"895CFD1D-4273-4D32-A2C4-CAC70200AB5B\": \"Integer\", \"A2EE7B4A-CE62-4290-B00C-B26C1BF18073\": \"Integer\", \"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542\": \"INT\", \"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1\": \"INTEGER\", \"B91D99E0-9B7C-416C-8737-B760957DAF09\": \"*int\", \"BFC87171-C74F-494A-B7C2-76B9C55FACC9\": \"INT\", \"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022\": \"INTEGER\", \"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30\": \"float\"}', NULL, NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_data_type` (`SERIAL_ID`, `DATA_TYPE_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `TYPE_MAPPING`, `OFFICIAL_LOCK`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877215703044', '89D69E81-EA34-42EE-9FA2-93B8BD27E098', '10', 'date', '日期', '{\"id\": \"89D69E81-EA34-42EE-9FA2-93B8BD27E098\", \"defKey\": \"date\", \"defName\": \"日期\", \"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307\": \"DATE\", \"11D1FB71-A587-4217-89BA-611B8A1F83E0\": \"DATETIME\", \"29D1CE08-4C35-4D2D-AAA9-23D93305B52E\": \"DATETIME\", \"592C7013-143D-4E7B-AF64-0D7BF1E28230\": \"DATE\", \"77BD85E5-9D0D-4096-8427-CBA306FC9C6A\": \"DATE\", \"797A1496-D649-4261-89B4-544132EC3F36\": \"Date\", \"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2\": \"timestamp\", \"89504F5D-94BF-4C9E-8B2E-44F37305FED5\": \"DATE\", \"895CFD1D-4273-4D32-A2C4-CAC70200AB5B\": \"Date\", \"A2EE7B4A-CE62-4290-B00C-B26C1BF18073\": \"Date\", \"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542\": \"DATE\", \"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1\": \"NUMERIC\", \"B91D99E0-9B7C-416C-8737-B760957DAF09\": \"*time.Time\", \"BFC87171-C74F-494A-B7C2-76B9C55FACC9\": \"DATETIME\", \"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022\": \"TIMESTAMP\", \"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30\": \"DateTime\"}', NULL, NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_data_type` (`SERIAL_ID`, `DATA_TYPE_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `TYPE_MAPPING`, `OFFICIAL_LOCK`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877215703045', 'D516E75B-90F5-4741-B9B3-A186A263F04C', '10', 'bytes', '二进制', '{\"id\": \"D516E75B-90F5-4741-B9B3-A186A263F04C\", \"defKey\": \"bytes\", \"defName\": \"二进制\", \"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307\": \"BLOB\", \"11D1FB71-A587-4217-89BA-611B8A1F83E0\": \"BINARY\", \"29D1CE08-4C35-4D2D-AAA9-23D93305B52E\": \"BLOB\", \"592C7013-143D-4E7B-AF64-0D7BF1E28230\": \"BYTEA\", \"77BD85E5-9D0D-4096-8427-CBA306FC9C6A\": \"BYTEA\", \"797A1496-D649-4261-89B4-544132EC3F36\": \"byte[]\", \"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2\": \"binary\", \"89504F5D-94BF-4C9E-8B2E-44F37305FED5\": \"BLOB\", \"895CFD1D-4273-4D32-A2C4-CAC70200AB5B\": \"byte[]\", \"A2EE7B4A-CE62-4290-B00C-B26C1BF18073\": \"byte[]\", \"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542\": \"BLOB\", \"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1\": \"NONE\", \"B91D99E0-9B7C-416C-8737-B760957DAF09\": \"[]byte\", \"BFC87171-C74F-494A-B7C2-76B9C55FACC9\": \"VARBINARY\", \"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022\": \"BYTEA\", \"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30\": \"binary\"}', NULL, NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_data_type` (`SERIAL_ID`, `DATA_TYPE_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `TYPE_MAPPING`, `OFFICIAL_LOCK`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877215703046', 'B17BDED3-085F-40E1-9019-3B79CF2BF075', '10', 'largeText', '大文本', '{\"id\": \"B17BDED3-085F-40E1-9019-3B79CF2BF075\", \"defKey\": \"largeText\", \"defName\": \"大文本\", \"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307\": \"CLOB\", \"11D1FB71-A587-4217-89BA-611B8A1F83E0\": \"STRING\", \"29D1CE08-4C35-4D2D-AAA9-23D93305B52E\": \"TEXT\", \"592C7013-143D-4E7B-AF64-0D7BF1E28230\": \"TEXT\", \"77BD85E5-9D0D-4096-8427-CBA306FC9C6A\": \"TEXT\", \"797A1496-D649-4261-89B4-544132EC3F36\": \"String\", \"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2\": \"string\", \"89504F5D-94BF-4C9E-8B2E-44F37305FED5\": \"CLOB\", \"895CFD1D-4273-4D32-A2C4-CAC70200AB5B\": \"String\", \"A2EE7B4A-CE62-4290-B00C-B26C1BF18073\": \"String\", \"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542\": \"CLOB\", \"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1\": \"TEXT\", \"B91D99E0-9B7C-416C-8737-B760957DAF09\": \"string\", \"BFC87171-C74F-494A-B7C2-76B9C55FACC9\": \"TEXT\", \"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022\": \"TEXT\", \"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30\": \"string\"}', NULL, NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');


INSERT INTO `core_domain` (`SERIAL_ID`, `DOMAIN_ID`, `PROJECT_ID`, `DATA_TYPE_ID`, `DEF_KEY`, `DEF_NAME`, `LEN_`, `SCALE_`, `UI_HINT`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877920346113', '9092C4E0-1A54-4859-ABBB-5B62DBC27573', '10', 'FC9790A7-36B8-4A48-8F9A-BC1042BCFE64', 'DefaultString', '默认字串', '255', NULL, '', NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02');
INSERT INTO `pdmaas`.`core_domain` (`SERIAL_ID`, `DOMAIN_ID`, `PROJECT_ID`, `DATA_TYPE_ID`, `DEF_KEY`, `DEF_NAME`, `LEN_`, `SCALE_`, `UI_HINT`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877924540418', '16120F75-6AA7-4483-868D-F07F511BB081', '10', 'FC9790A7-36B8-4A48-8F9A-BC1042BCFE64', 'IdOrKey', '主键标识', '32', NULL, '', NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02');
INSERT INTO `pdmaas`.`core_domain` (`SERIAL_ID`, `DOMAIN_ID`, `PROJECT_ID`, `DATA_TYPE_ID`, `DEF_KEY`, `DEF_NAME`, `LEN_`, `SCALE_`, `UI_HINT`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877924540419', '54611CCC-CA4B-42E1-9F32-4944C85B85A6', '10', 'FC9790A7-36B8-4A48-8F9A-BC1042BCFE64', 'Name', '名称', '90', NULL, '', NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02');
INSERT INTO `pdmaas`.`core_domain` (`SERIAL_ID`, `DOMAIN_ID`, `PROJECT_ID`, `DATA_TYPE_ID`, `DEF_KEY`, `DEF_NAME`, `LEN_`, `SCALE_`, `UI_HINT`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877924540420', '6BC8F04B-6CFA-4995-98D3-318F5CDD774E', '10', '1D764C4A-6F9F-421E-B11A-6F3E23B51811', 'Int', '整数', NULL, NULL, '', NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02');
INSERT INTO `pdmaas`.`core_domain` (`SERIAL_ID`, `DOMAIN_ID`, `PROJECT_ID`, `DATA_TYPE_ID`, `DEF_KEY`, `DEF_NAME`, `LEN_`, `SCALE_`, `UI_HINT`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877924540421', 'FF4459C5-6B45-4DBF-8FC0-E06239BC05B4', '10', '1A0BDC09-0792-4174-9E8E-80BE8DF44B8E', 'Double', '小数', '24', '6', '', NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02');
INSERT INTO `pdmaas`.`core_domain` (`SERIAL_ID`, `DOMAIN_ID`, `PROJECT_ID`, `DATA_TYPE_ID`, `DEF_KEY`, `DEF_NAME`, `LEN_`, `SCALE_`, `UI_HINT`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877928734721', 'C3B1681B-99F9-4818-9E80-DE1652A51D85', '10', '1A0BDC09-0792-4174-9E8E-80BE8DF44B8E', 'Money', '金额', '24', '6', '', NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02');
INSERT INTO `pdmaas`.`core_domain` (`SERIAL_ID`, `DOMAIN_ID`, `PROJECT_ID`, `DATA_TYPE_ID`, `DEF_KEY`, `DEF_NAME`, `LEN_`, `SCALE_`, `UI_HINT`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877928734722', '7CFFA0D3-6A93-4DDC-BC10-DF21211064DC', '10', '89D69E81-EA34-42EE-9FA2-93B8BD27E098', 'DateTime', '日期时间', NULL, NULL, '', NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02');
INSERT INTO `pdmaas`.`core_domain` (`SERIAL_ID`, `DOMAIN_ID`, `PROJECT_ID`, `DATA_TYPE_ID`, `DEF_KEY`, `DEF_NAME`, `LEN_`, `SCALE_`, `UI_HINT`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877928734723', '6F7C1C5C-D159-41E6-BF9D-54DEEFA79AFF', '10', 'FC9790A7-36B8-4A48-8F9A-BC1042BCFE64', 'YesNo', '是否', '1', NULL, '', NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02');
INSERT INTO `pdmaas`.`core_domain` (`SERIAL_ID`, `DOMAIN_ID`, `PROJECT_ID`, `DATA_TYPE_ID`, `DEF_KEY`, `DEF_NAME`, `LEN_`, `SCALE_`, `UI_HINT`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877928734724', '73FD2BAD-2358-4336-B96D-45DC897BD792', '10', 'FC9790A7-36B8-4A48-8F9A-BC1042BCFE64', 'Dict', '数据字典', '32', NULL, '', NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02');
INSERT INTO `pdmaas`.`core_domain` (`SERIAL_ID`, `DOMAIN_ID`, `PROJECT_ID`, `DATA_TYPE_ID`, `DEF_KEY`, `DEF_NAME`, `LEN_`, `SCALE_`, `UI_HINT`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764877928734725', '3E948CEC-3070-472C-AF92-F3CA11EC9D15', '10', 'FC9790A7-36B8-4A48-8F9A-BC1042BCFE64', 'DescText', '描述文本', '900', NULL, '', NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02');


INSERT INTO `core_referen_catalog` (`SERIAL_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764879577096193', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'personInfo', '个人基本信息要素', NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02');


INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764871872159745', '3622D417-DA1A-408F-BEE1-11D328D534A0', 'BF9E20E0-80D3-486D-BD58-5FADCF3E4A1D', '10', 'M', '男', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764871876354049', '380A0790-64A7-481E-831C-32F7BEE1502B', 'BF9E20E0-80D3-486D-BD58-5FADCF3E4A1D', '10', 'F', '女', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764871876354050', 'FA239F4D-1276-40D9-B230-F66BD35C3C27', 'BF9E20E0-80D3-486D-BD58-5FADCF3E4A1D', '10', 'U', '未知', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764872350310401', '61F3145A-7599-4CCB-B298-D5EE788107BE', '06EED564-BBA9-4747-8D73-AF809A330CB8', '10', '10', '共青团员', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764872350310402', 'ED16D25A-AB2F-4FA0-BB48-2B9031FA28C4', '06EED564-BBA9-4747-8D73-AF809A330CB8', '10', '20', '中共党员', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764872354504705', '0FB7974A-AE11-438F-86E0-B163316F9272', '06EED564-BBA9-4747-8D73-AF809A330CB8', '10', '30', '民主党派', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764872354504706', '7D247234-7E97-45B1-8C56-4A17A370854A', '06EED564-BBA9-4747-8D73-AF809A330CB8', '10', '40', '群众', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764872354504707', 'DA65D752-AF04-4A11-81D8-14A38692A64A', '06EED564-BBA9-4747-8D73-AF809A330CB8', '10', '90', '未知', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764872996233217', '20EE81BC-74EE-47DA-A56F-9663B23F44BD', 'EA1587B7-3954-437A-BFE0-FCB0453BCABA', '10', 'UNMARRIED', '未婚', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764872996233218', '4DCA10A8-417E-4A8D-BDF6-0A278C060ADC', 'EA1587B7-3954-437A-BFE0-FCB0453BCABA', '10', 'MARRIED', '已婚', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764872996233219', '826062A7-057C-4892-B338-06459F5B808D', 'EA1587B7-3954-437A-BFE0-FCB0453BCABA', '10', 'WIDOWED', '丧偶', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764873000427521', 'B23200B4-5E59-4F5E-A779-D981A040FA32', 'EA1587B7-3954-437A-BFE0-FCB0453BCABA', '10', 'DIVORCE', '离婚', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764873000427522', 'A7928FE2-349A-4702-9682-2EF7205E077B', 'EA1587B7-3954-437A-BFE0-FCB0453BCABA', '10', 'UNSPECIFIED', '未说明', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:00', '1567321753332965378', '2022-09-22 09:49:00');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875433123842', 'E9CA1CC9-8851-4F6B-86BA-B9CF0E44EB73', '4642BC5F-02EE-4E17-A60C-CF22F86A0282', '10', 'Normal', '正常', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875433123843', 'DEC51D7C-99DF-430C-817D-0499862D3CCC', '4642BC5F-02EE-4E17-A60C-CF22F86A0282', '10', 'Graduated', '毕业', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875433123844', '8853D6B6-75D3-4479-9006-FC731CD85B20', '4642BC5F-02EE-4E17-A60C-CF22F86A0282', '10', 'Studied', '肄业', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875433123845', 'C74BA8CF-1DC6-4C79-BAAC-F11EB9C6AF01', '4642BC5F-02EE-4E17-A60C-CF22F86A0282', '10', 'Stop', '休学', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875978383361', '9224DF53-F7C0-447D-B8ED-0A39F799EE19', '115EDEFC-0323-410E-81AB-CCAB8879837A', '10', '01', '汉族', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875982577665', 'D57818E3-9206-45BB-AE79-27C64A4AB80F', '115EDEFC-0323-410E-81AB-CCAB8879837A', '10', '02', '蒙古族', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875982577666', '0A1A3CA9-6D68-4E15-8BD0-9A2FF428D804', '115EDEFC-0323-410E-81AB-CCAB8879837A', '10', '03', '回族', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875982577667', '7CC6B6BE-47EA-460E-ACFA-C377468DEA11', '115EDEFC-0323-410E-81AB-CCAB8879837A', '10', '04', '藏族', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875986771969', 'A666D51F-D249-4FAC-B1F3-78C371836CB3', '115EDEFC-0323-410E-81AB-CCAB8879837A', '10', '05', '维吾尔族', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875986771970', 'A0C9E1BA-D87B-4695-ADFA-287FDA32BB5A', '115EDEFC-0323-410E-81AB-CCAB8879837A', '10', '06', '苗族', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875986771971', '149B5B9E-C1D1-4790-8CCF-0ED5F4B25172', '115EDEFC-0323-410E-81AB-CCAB8879837A', '10', '07', '彝族', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875986771972', 'F9A3E65C-BF4D-4C6B-ADB7-8C9CF0487360', '115EDEFC-0323-410E-81AB-CCAB8879837A', '10', '08', '壮族', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875990966273', '14F17DE4-E96A-460B-98A6-F84EC8CF9885', '115EDEFC-0323-410E-81AB-CCAB8879837A', '10', '09', '布依族', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875990966274', '8A81AB18-B1BF-4797-A6E5-DEDB2C6566B0', '115EDEFC-0323-410E-81AB-CCAB8879837A', '10', '10', '朝鲜族', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');
INSERT INTO `pdmaas`.`core_dict_item` (`SERIAL_ID`, `DICT_ITEM_ID`, `DICT_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `INTRO`, `PARENT_KEY`, `ENABLED_`, `SORT_`, `ATTR1`, `ATTR2`, `ATTR3`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1572764875990966275', '7D460947-FBD2-4E4D-8366-3B38DCAF09D1', '115EDEFC-0323-410E-81AB-CCAB8879837A', '10', '11', '满族', '', '', NULL, NULL, '', '', '', NULL, '1567321753332965378', '2022-09-22 09:49:01', '1567321753332965378', '2022-09-22 09:49:01');

INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879723896834', 'A64A91C8-A41F-4113-92FB-7563D7EF054D', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'ID_CARD_NO', '身份证号', '', NULL, 60, NULL, 'N', 'N', 'N', '', 'N', NULL, '9092C4E0-1A54-4859-ABBB-5B62DBC27573', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879723896835', '479DA2AB-1974-411A-A81E-92FB939E75EB', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'MOBILE_PHONE', '手机号', '', NULL, 60, NULL, 'N', 'N', 'N', '', 'N', NULL, '9092C4E0-1A54-4859-ABBB-5B62DBC27573', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879728091137', '48473E29-6594-4912-AADE-C8AB44FCA3E9', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'GENDER', '性别', '', NULL, 32, NULL, 'N', 'N', 'N', '', 'N', NULL, '73FD2BAD-2358-4336-B96D-45DC897BD792', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879728091138', '2BD3D2EE-2411-49A6-983D-84B81057312F', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'BIRTH', '出生日期', '', NULL, NULL, NULL, 'N', 'N', 'N', '', 'N', NULL, '7CFFA0D3-6A93-4DDC-BC10-DF21211064DC', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879728091139', 'FDD67CEE-4B52-4BD1-A1A3-9C5EBC6037E6', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'AVATAR', '头像', '', NULL, 60, NULL, 'N', 'N', 'N', '', 'N', NULL, '9092C4E0-1A54-4859-ABBB-5B62DBC27573', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879728091140', 'CAAA0E79-41A1-4758-B481-D171168C4D68', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'HEIGHT', '身高', '', NULL, NULL, NULL, 'N', 'N', 'N', '', 'N', NULL, '6BC8F04B-6CFA-4995-98D3-318F5CDD774E', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879732285442', '575482CE-64A6-4CB9-99DC-8E126D190AAA', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'WEIGHT', '体重', '', NULL, NULL, NULL, 'N', 'N', 'N', '', 'N', NULL, '6BC8F04B-6CFA-4995-98D3-318F5CDD774E', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879732285443', '15B0D75D-0B97-4985-A816-D0EAFA90446B', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'NATION', '名族', '', NULL, 32, NULL, 'N', 'N', 'N', '', 'N', NULL, '73FD2BAD-2358-4336-B96D-45DC897BD792', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879732285444', 'F458E86D-84D6-45A1-9DD3-51E6C8170D7F', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'POLITICAL', '政治面貌', '', NULL, 32, NULL, 'N', 'N', 'N', '', 'N', NULL, '73FD2BAD-2358-4336-B96D-45DC897BD792', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879732285445', '7275E578-6893-4922-AC69-95B261BFBD61', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'MARITAL', '婚姻状况', '', NULL, 32, NULL, 'N', 'N', 'N', '', 'N', NULL, '73FD2BAD-2358-4336-B96D-45DC897BD792', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879732285446', 'F04BF130-3EC1-4E02-9DED-3214CA88E352', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'DOMICILE_PLACE_PROVINCE', '籍贯（省）', '', NULL, 60, NULL, 'N', 'N', 'N', '', 'N', NULL, '9092C4E0-1A54-4859-ABBB-5B62DBC27573', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879732285447', 'B97F5BC2-33DE-4857-9DB8-ECFD02C9040C', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'DOMICILE_PLACE_CITY', '籍贯（市）', '', NULL, 32, NULL, 'N', 'N', 'N', '', 'N', NULL, '73FD2BAD-2358-4336-B96D-45DC897BD792', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
INSERT INTO `pdmaas`.`core_referen_field` (`SERIAL_ID`, `REFEREN_FIELD_ID`, `CATALOG_ID`, `PROJECT_ID`, `DEF_KEY`, `DEF_NAME`, `COMMENT_`, `DATA_TYPE_ID`, `LEN_`, `SCALE_`, `PRIMARY_KEY`, `NOT_NULL`, `AUTO_INCREMENT`, `DEFAULT_VALUE`, `HIDE_IN_GRAPH`, `REF_DICT_ID`, `DOMAIN_ID`, `UI_HINT`, `PROPERTIES`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `NOTES`) VALUES ('1572764879736479746', '812ADF1D-8C03-40CA-B030-E539838FB889', 'F30202B9-4B5D-4CE7-87CE-B3890C84D3F2', '10', 'DOMICILE_PLACE_ADDRESS', '户籍地址', '', NULL, 60, NULL, 'N', 'N', 'N', '', 'N', NULL, '9092C4E0-1A54-4859-ABBB-5B62DBC27573', NULL, NULL, NULL, '1567321753332965378', '2022-09-22 09:49:02', '1567321753332965378', '2022-09-22 09:49:02', NULL);
